drivers: adc: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
bd2b7d80d1
commit
efecfe2678
@ -497,7 +497,7 @@ static int adc_cc23x0_init(const struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct adc_driver_api adc_cc23x0_driver_api = {
|
||||
static DEVICE_API(adc, adc_cc23x0_driver_api) = {
|
||||
.channel_setup = adc_cc23x0_channel_setup,
|
||||
.read = adc_cc23x0_read,
|
||||
#ifdef CONFIG_ADC_ASYNC
|
||||
|
||||
@ -143,7 +143,7 @@ static int adc_ch32v00x_init(const struct device *dev)
|
||||
#define ADC_CH32V00X_DEVICE(n) \
|
||||
PINCTRL_DT_INST_DEFINE(n); \
|
||||
\
|
||||
static const struct adc_driver_api adc_ch32v00x_api_##n = { \
|
||||
static DEVICE_API(adc, adc_ch32v00x_api_##n) = { \
|
||||
.channel_setup = adc_ch32v00x_channel_setup, \
|
||||
.read = adc_ch32v00x_read, \
|
||||
.ref_internal = DT_INST_PROP(n, vref_mv), \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user