Skip to content

Commit

Permalink
aio: Fix setting adc bits when initializing
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
AsuraZeng committed Jan 13, 2023
1 parent 8b1c549 commit e523a2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aio/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ mraa_aio_init(unsigned int aio)
}

raw_bits = mraa_adc_raw_bits();
mraa_aio_set_bit(dev, DEFAULT_BITS);
mraa_aio_set_bit(dev, raw_bits);

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

0 comments on commit e523a2b

Please sign in to comment.