Skip to content

Commit 7bc183c

Browse files
committed
aio: Fix setting adc bits when initializing
Set the adc bits to the default value of 10, so the raw bits of the platform will not take effect during initialization, and it is always the default value Signed-off-by: chao zeng <[email protected]>
1 parent 8b1c549 commit 7bc183c

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)