File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed
build/devices/zephyr/targets/stm32u5a9j_dk Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 11{
22 "build" : {
3- "ZEPHYR_BOARD" : " stm32u5a9j_dk "
3+ "ZEPHYR_BOARD" : " stm32u5g9j_dk1 "
44 },
55 "include" : [
66 ],
Original file line number Diff line number Diff line change @@ -47,22 +47,27 @@ typedef struct AnalogRecord *Analog;
4747
4848#if !DT_NODE_EXISTS (DT_PATH (zephyr_user )) || \
4949 !DT_NODE_HAS_PROP (DT_PATH (zephyr_user ), io_channels )
50- #error "No suitable devicetree overlay specified"
51- #endif
50+ #warning "No suitable analog devicetree overlay specified"
51+ #define NO_CHANNELS 1
5252
53- #define DT_SPEC_AND_COMMA (node_id , prop , idx ) \
54- ADC_DT_SPEC_GET_BY_IDX(node_id, idx),
53+ static const struct adc_dt_spec adc_channels [0 ];
54+ #else
55+ #define DT_SPEC_AND_COMMA (node_id , prop , idx ) \
56+ ADC_DT_SPEC_GET_BY_IDX(node_id, idx),
5557
56- static const struct adc_dt_spec adc_channels [] = {
57- DT_FOREACH_PROP_ELEM (DT_PATH (zephyr_user ), io_channels , DT_SPEC_AND_COMMA )
58- };
58+ static const struct adc_dt_spec adc_channels [] = {
59+ DT_FOREACH_PROP_ELEM (DT_PATH (zephyr_user ), io_channels , DT_SPEC_AND_COMMA )
60+ };
61+ #endif
5962
6063static int adc_channel_idx (int channel ) {
6164 int i ;
65+ #if ! NO_CHANNELS
6266 for (i = 0 ; i < (sizeof (adc_channels )/sizeof (struct adc_dt_spec )); i ++ ) {
6367 if (adc_channels [i ].channel_id == channel )
6468 return i ;
6569 }
70+ #endif
6671 return -1 ;
6772}
6873
You can’t perform that action at this time.
0 commit comments