Skip to content

Commit 2ed8790

Browse files
Benni77kartben
authored andcommitted
drivers: adc: fix IF_ENABLED macro usage in ADS1X1X trigger
The ADC_ADS1X1X_TRIGGER macro was defined without an explicit value, preventing ALERT/RDY pin configuration even when alert_rdy_gpios were properly defined in devicetree. This occurred because the IF_ENABLED macro specifically requires macros to be defined as 1, not just defined empty. Fixed this by explicitly defining ADC_ADS1X1X_TRIGGER as 1 when alert_rdy_gpios properties are present in devicetree. Signed-off-by: Benjamin Geiger <[email protected]>
1 parent af9ae5b commit 2ed8790

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/adc/adc_ads1x1x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ LOG_MODULE_REGISTER(ADS1X1X, CONFIG_ADC_LOG_LEVEL);
2626
DT_ANY_COMPAT_HAS_PROP_STATUS_OKAY(ti_ads1015, alert_rdy_gpios) || \
2727
DT_ANY_COMPAT_HAS_PROP_STATUS_OKAY(ti_ads1014, alert_rdy_gpios)
2828

29-
#define ADC_ADS1X1X_TRIGGER
29+
#define ADC_ADS1X1X_TRIGGER 1
3030

3131
#endif
3232

0 commit comments

Comments
 (0)