You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
603 B

4 years ago
  1. #ifndef _ADC_H_
  2. #define _ADC_H_
  3. #include "port.h"
  4. #include "systick.h"
  5. #include "ozone_work.h"
  6. void ADCInit(void);
  7. uint16_t get_adc_value(void);
  8. void adc_loop_gather(void);
  9. void beg_average_value(uint16_t *adc_buff);
  10. typedef struct {
  11. bool abnormal_state;
  12. bool past_count_reached_five;
  13. bool first_detection_abnormal;
  14. uint16_t adc_value_buff[5];
  15. uint8_t adc_value_count;
  16. }adc_t;
  17. // typedef struct {
  18. // uint16_t adc_value_buff[5];
  19. // uint8_t adc_value_count;
  20. // bool abnormal_state;
  21. // bool past_count_reached_five; //����ʹ��
  22. // } adc_t;
  23. #endif