Fix calculation of bit-weight for reset pin

This commit is contained in:
Jeff Epler 2023-09-26 08:33:00 -05:00
parent 3af5cbc312
commit 6990c37320
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ STATIC mp_obj_t ioexpander_send_init_sequence(size_t n_args, const mp_obj_t *pos
mp_int_t reset_mask = 0;
if (args[ARG_reset_bit].u_obj != MP_ROM_NONE) {
mp_int_t reset_bit = mp_arg_validate_int_range(mp_arg_validate_type_int(args[ARG_reset_bit].u_obj, MP_QSTR_reset_bit), 0, max_bit, MP_QSTR_reset_bit);
reset_mask = (1 << reset_bit);
reset_mask = 0x100 << reset_bit;
}
mp_buffer_info_t bufinfo_i2c_init_sequence = {};