adc: rename EFI_ADC_LAST_CHANNEL to EFI_ADC_TOTAL_CHANNELS
This commit is contained in:
parent
61ed0f6dfa
commit
d7ec871e7c
|
@ -34,7 +34,7 @@ typedef enum __attribute__ ((__packed__)) {
|
|||
EFI_ADC_30 = 31,
|
||||
EFI_ADC_31 = 32,
|
||||
|
||||
EFI_ADC_LAST_CHANNEL = 33, // Please keep this in sync with the last valid channel index!
|
||||
EFI_ADC_TOTAL_CHANNELS = 33, // Please keep this in sync with the last valid channel index!
|
||||
|
||||
EFI_ADC_ERROR = 50,
|
||||
} adc_channel_e;
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
explicit AdcDevice(ADCConversionGroup* hwConfig, adcsample_t *buf, size_t buf_len);
|
||||
void enableChannel(adc_channel_e hwChannelIndex);
|
||||
adc_channel_e getAdcHardwareIndexByInternalIndex(int index) const;
|
||||
uint8_t internalAdcIndexByHardwareIndex[EFI_ADC_LAST_CHANNEL];
|
||||
uint8_t internalAdcIndexByHardwareIndex[EFI_ADC_TOTAL_CHANNELS];
|
||||
bool isHwUsed(adc_channel_e hwChannel) const;
|
||||
int size() const;
|
||||
void init(void);
|
||||
|
|
|
@ -20,7 +20,7 @@ float getAnalogInputDividerCoefficient(adc_channel_e);
|
|||
inline bool isAdcChannelValid(adc_channel_e hwChannel) {
|
||||
if (hwChannel <= EFI_ADC_NONE) {
|
||||
return false;
|
||||
} else if (hwChannel >= EFI_ADC_LAST_CHANNEL) {
|
||||
} else if (hwChannel >= EFI_ADC_TOTAL_CHANNELS) {
|
||||
/* this should not happen!
|
||||
* if we have enum out of range somewhere in settings
|
||||
* that means something goes terribly wrong
|
||||
|
|
Loading…
Reference in New Issue