Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e523a2b

Browse files
committedJan 13, 2023
aio: Fix setting adc bits when initializing
Use the number of adc bits set by the hardware instead of using the default hard-coded 10 bits Signed-off-by: chao zeng <[email protected]>
1 parent 8b1c549 commit e523a2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/aio/aio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ mraa_aio_init(unsigned int aio)
133133
}
134134

135135
raw_bits = mraa_adc_raw_bits();
136-
mraa_aio_set_bit(dev, DEFAULT_BITS);
136+
mraa_aio_set_bit(dev, raw_bits);
137137

138138
if (IS_FUNC_DEFINED(dev, aio_init_pre)) {
139139
mraa_result_t pre_ret = (dev->advance_func->aio_init_pre(aio));

0 commit comments

Comments
 (0)
Please sign in to comment.