mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
updated ADC driver to use more of available inputs, as well as made input selection more sane
This commit is contained in:
parent
fd4bb1eb1c
commit
be5896f5b3
2 changed files with 63 additions and 34 deletions
|
@ -1,13 +1,16 @@
|
|||
#pragma once
|
||||
|
||||
#define ADC_BATTERY 0
|
||||
#define ADC_CURRENT 1
|
||||
typedef enum {
|
||||
ADC_BATTERY = 0,
|
||||
ADC_EXTERNAL1 = 1,
|
||||
ADC_EXTERNAL2 = 2,
|
||||
ADC_CHANNEL_MAX = 3
|
||||
} AdcChannel;
|
||||
|
||||
typedef struct drv_adc_config_t {
|
||||
uint8_t powerAdcChannel; // which channel used for current monitor, allowed PA1, PB1 (ADC_Channel_1, ADC_Channel_9)
|
||||
} drv_adc_config_t;
|
||||
|
||||
|
||||
void adcInit(drv_adc_config_t *init);
|
||||
uint16_t adcGetChannel(uint8_t channel);
|
||||
#ifdef FY90Q
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue