Skip to content

Commit

Permalink
ports/psoc6: Fix hardcoded GPIO number.
Browse files Browse the repository at this point in the history
Signed-off-by: IFX-Anusha <[email protected]>

 ports/psoc6: Fix hardcoded GPIO number.

Signed-off-by: IFX-Anusha <[email protected]>
  • Loading branch information
IFX-Anusha authored and actions-user committed Dec 21, 2023
1 parent 65f4083 commit 9e68d20
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ports/psoc6/modules/machine/machine_pin.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,4 +440,4 @@ MP_DEFINE_CONST_OBJ_TYPE(
locals_dict, &machine_pin_locals_dict
);

MP_REGISTER_ROOT_POINTER(void *machine_pin_irq_obj[113]); // Number of GPIO pins
MP_REGISTER_ROOT_POINTER(void *machine_pin_irq_obj[MAX_IO_PINS]);
4 changes: 3 additions & 1 deletion tests/psoc6/dut/pin.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,7 @@
pin_out.off()
print("pin out value off: ", pin_in.value() == 0)

pin_in.irq(handler=lambda t:print("Interrupt triggered"),trigger=Pin.IRQ_RISING|Pin.IRQ_FALLING)
pin_in.irq(
handler=lambda t: print("Interrupt triggered"), trigger=Pin.IRQ_RISING | Pin.IRQ_FALLING
)
pin_out.high()
1 change: 0 additions & 1 deletion tests/psoc6/timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@
pass

t.deinit()

0 comments on commit 9e68d20

Please sign in to comment.