diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/adc.h | 4 | ||||
-rw-r--r-- | include/config.h | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/adc.h b/include/adc.h index b52798419a..8342bc1fb6 100644 --- a/include/adc.h +++ b/include/adc.h @@ -21,7 +21,11 @@ * Boards must provide this list of ADC channel definitions. This must match * the enum adc_channel list provided by the board. */ +#ifndef CONFIG_ADC_CHANNELS_RUNTIME_CONFIG extern const struct adc_t adc_channels[]; +#else +extern struct adc_t adc_channels[]; +#endif /* * Boards which use the ADC interface must provide enum adc_channel in the diff --git a/include/config.h b/include/config.h index 057ae9b8b7..807fd52f17 100644 --- a/include/config.h +++ b/include/config.h @@ -299,6 +299,11 @@ #undef CONFIG_ADC /* + * Allow runtime configuration of the adc_channels[] array + */ +#undef CONFIG_ADC_CHANNELS_RUNTIME_CONFIG + +/* * ADC sample time selection. The value is chip-dependent. * TODO: Replace this with CONFIG_ADC_PROFILE entries. */ |