Feature request: gpio_set_irq_enabled_for_cpu() #2354

Open
opened 2025-03-18 00:19:44 -05:00 by projectgus · 0 comments
projectgus commented 2025-03-18 00:19:44 -05:00 (Migrated from github.com)

We've come across a use case in MicroPython for enabling a gpio interrupt event on a specific core, rather than the executing core (context is https://github.com/micropython/micropython/pull/16915).

This seems supported by the hardware and relatively low-risk due to the atomic bit operations, so I was wondering if we could please have it in pico-sdk. i.e. something like:

void gpio_set_irq_enabled(uint gpio, uint32_t event_mask, bool enabled); // Existing function

void gpio_set_irq_enabled_for_cpu(uint gpio, uint32_t event_mask, bool enabled, uint cpu);

... or similar. It seems like most of the common implementation can stay the same.

(There are probably a couple of gpio interrupt functions that could support this pattern, I'm just mentioning this one as it's the one we have a use case for.)

We've come across a use case in MicroPython for enabling a gpio interrupt event on a specific core, rather than the executing core (context is https://github.com/micropython/micropython/pull/16915). This seems supported by the hardware and relatively low-risk due to the atomic bit operations, so I was wondering if we could please have it in pico-sdk. i.e. something like: ```c void gpio_set_irq_enabled(uint gpio, uint32_t event_mask, bool enabled); // Existing function void gpio_set_irq_enabled_for_cpu(uint gpio, uint32_t event_mask, bool enabled, uint cpu); ``` ... or similar. It seems like most of the common implementation can stay the same. (There are probably a couple of gpio interrupt functions that could support this pattern, I'm just mentioning this one as it's the one we have a use case for.)
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#2354
No description provided.