Skip to content

Commit

Permalink
Update machine_encoder.c
Browse files Browse the repository at this point in the history
  • Loading branch information
IhorNehrutsa committed Aug 16, 2023
1 parent b663267 commit 263d7b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ports/esp32/machine_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ STATIC void mp_machine_Counter_init_helper(mp_pcnt_obj_t *self, size_t n_args, c
} else {
self->x124 = 0;
if (direction != MP_OBJ_NULL) {
if (mp_obj_is_type(direction, &machine_pin_type)) {
if (mp_obj_is_type(direction, &machine_pin_type) || mp_obj_is_small_int(direction)) {
self->bPinNumber = pin_or_int(direction);
} else {
self->bPinNumber = mp_obj_get_int(direction);
Expand Down

0 comments on commit 263d7b9

Please sign in to comment.