Skip to content

cores/psoc6: ./docs: Add interrupt modes high and low. #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cores/psoc6/interrupts.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ void attachInterrupt(pin_size_t interruptNumber, voidFuncPtr callback, PinStatus
break;

case RISING:
case HIGH:
event = CYHAL_GPIO_IRQ_RISE;
break;

case FALLING:
case LOW:
event = CYHAL_GPIO_IRQ_FALL;
break;

Expand Down
15 changes: 15 additions & 0 deletions docs/arduino-deviations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ Digital IO

Once a pin is configured using pinMode as GPIO pins, it may no longer be available for use with any other peripherals (e.g., PWM, I2C, SPI, GPIO, etc.).


Interrupts
----------

.. code-block:: cpp

void attachInterrupt(pin_size_t interruptNumber, voidFuncPtr callback, PinStatus mode)

Interrupts are triggered only for the RISING or FALLING edge by the hardware. The LOW and HIGH modes are not natively supported but are internally mapped for compatibility:

- LOW mode is mapped to FALLING edge detection.
- HIGH mode is mapped to RISING edge detection.

This mapping simplifies compatibility but may not replicate the exact behavior of other Arduino platforms that natively support LOW and HIGH interrupt levels.

Analog IO
---------

Expand Down
Loading