Skip to content

Commit 45587ff

Browse files
jaz1-nordicjukkar
authored andcommitted
[nrf fromlist] drivers: adc: nrfx: fix for negative samples in single-mode
We need to check value of the sample not the pointer. Upstream PR #: 91368 Signed-off-by: Jakub Zymelka <[email protected]> (cherry picked from commit e54b994)
1 parent 58f0de4 commit 45587ff

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
@@ -541,7 +541,7 @@ static inline void single_ended_channel_cut_negative_sample(uint16_t channel_bit
541541
uint8_t single_ended_channels,
542542
int16_t **sample)
543543
{
544-
if ((channel_bit & single_ended_channels) && (*sample < 0)) {
544+
if ((channel_bit & single_ended_channels) && (**sample < 0)) {
545545
**sample = 0;
546546
}
547547

0 commit comments

Comments
 (0)