Skip to content

Commit cb1e406

Browse files
jaz1-nordicnika-nordic
authored andcommitted
[nrf fromtree] drivers: adc: nrfx_saadc: Fix SAADC shim for nRF54LV10A
GAIN field is not present on LV10A, so instead we need to check the input value to the function. Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no> (cherry picked from commit 35044b6)
1 parent b935d4e commit cb1e406

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/adc/adc_nrfx_saadc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ static int gain_set(nrf_saadc_channel_config_t *ch_cfg, enum adc_gain gain)
283283
#endif
284284
default:
285285
#else
286-
if (ch_cfg->gain != ADC_GAIN_1) {
286+
if (gain != ADC_GAIN_1) {
287287
#endif /* defined(NRF_SAADC_HAS_CH_GAIN) */
288288
LOG_ERR("Selected ADC gain is not valid");
289289
return -EINVAL;

0 commit comments

Comments
 (0)