Skip to content

Commit b5f0695

Browse files
committed
ZephyrCommon: allow boards without any ADC channel configured
1 parent 0c78c6b commit b5f0695

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/zephyrCommon.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ const struct adc_dt_spec arduino_adc[] =
170170
const pin_size_t arduino_analog_pins[] =
171171
{ DT_FOREACH_PROP_ELEM(DT_PATH(zephyr_user), adc_pin_gpios, ADC_PINS) };
172172

173-
struct adc_channel_cfg channel_cfg[ARRAY_SIZE(arduino_analog_pins)] =
173+
struct adc_channel_cfg channel_cfg[] =
174174
{ DT_FOREACH_PROP_ELEM(DT_PATH(zephyr_user), io_channels, ADC_CH_CFG) };
175175

176176
size_t analog_pin_index(pin_size_t pinNumber) {

0 commit comments

Comments
 (0)