api_rt_adc.h 417 B

123456789101112131415161718192021222324
  1. #ifndef _API_RT_ADC_H_
  2. #define _API_RT_ADC_H_
  3. #include <stdint.h>
  4. #include "gd32f30x.h"
  5. #define ADC_DEVICE_COUNT 1
  6. #define ADC_RESULT_SIZE 16
  7. typedef struct
  8. {
  9. uint32_t AdcBase;
  10. uint32_t DmaBase;
  11. dma_channel_enum *DmaChannelBase;
  12. uint16_t Results[ADC_RESULT_SIZE];
  13. } Adc_Handle;
  14. extern Adc_Handle Adcs[2];
  15. void AdcLow_Init(void);
  16. void AdcLow_CompleteIsr(uint8_t devIndex);
  17. #endif