Hellen says merge #1772 ADC flexibility
This commit is contained in:
parent
4819c86eaa
commit
c4cbdf0d77
|
@ -9,7 +9,9 @@
|
||||||
|
|
||||||
#if HAL_USE_ADC
|
#if HAL_USE_ADC
|
||||||
|
|
||||||
|
#ifndef ADC_MAX_CHANNELS_COUNT
|
||||||
#define ADC_MAX_CHANNELS_COUNT 16
|
#define ADC_MAX_CHANNELS_COUNT 16
|
||||||
|
#endif /* ADC_MAX_CHANNELS_COUNT */
|
||||||
|
|
||||||
// this structure contains one multi-channel ADC state snapshot
|
// this structure contains one multi-channel ADC state snapshot
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -22,7 +24,7 @@ public:
|
||||||
void enableChannel(adc_channel_e hwChannelIndex);
|
void enableChannel(adc_channel_e hwChannelIndex);
|
||||||
void enableChannelAndPin(adc_channel_e hwChannelIndex);
|
void enableChannelAndPin(adc_channel_e hwChannelIndex);
|
||||||
adc_channel_e getAdcHardwareIndexByInternalIndex(int index) const;
|
adc_channel_e getAdcHardwareIndexByInternalIndex(int index) const;
|
||||||
int internalAdcIndexByHardwareIndex[20];
|
int internalAdcIndexByHardwareIndex[ADC_MAX_CHANNELS_COUNT + 4];
|
||||||
bool isHwUsed(adc_channel_e hwChannel) const;
|
bool isHwUsed(adc_channel_e hwChannel) const;
|
||||||
int size() const;
|
int size() const;
|
||||||
void init(void);
|
void init(void);
|
||||||
|
@ -48,8 +50,8 @@ private:
|
||||||
/**
|
/**
|
||||||
* Number of ADC channels in use
|
* Number of ADC channels in use
|
||||||
*/
|
*/
|
||||||
|
|
||||||
adc_channel_e hardwareIndexByIndernalAdcIndex[20];
|
adc_channel_e hardwareIndexByIndernalAdcIndex[ADC_MAX_CHANNELS_COUNT + 4];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* HAL_USE_ADC */
|
#endif /* HAL_USE_ADC */
|
||||||
|
|
Loading…
Reference in New Issue