mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2026-01-27 17:37:20 +01:00
fix regression caused by moving set_raw_irq_handler_and_unlock() (#2631)
Some checks failed
Bazel presubmit checks / bazel-build-check (macos-latest) (push) Has been cancelled
Bazel presubmit checks / bazel-build-check (ubuntu-latest) (push) Has been cancelled
Bazel presubmit checks / other-bazel-checks (push) Has been cancelled
Check Configs / check-configs (push) Has been cancelled
CMake / build (push) Has been cancelled
Build on macOS / build (push) Has been cancelled
Build on Windows / build (push) Has been cancelled
Some checks failed
Bazel presubmit checks / bazel-build-check (macos-latest) (push) Has been cancelled
Bazel presubmit checks / bazel-build-check (ubuntu-latest) (push) Has been cancelled
Bazel presubmit checks / other-bazel-checks (push) Has been cancelled
Check Configs / check-configs (push) Has been cancelled
CMake / build (push) Has been cancelled
Build on macOS / build (push) Has been cancelled
Build on Windows / build (push) Has been cancelled
This commit is contained in:
parent
1ca77d6afd
commit
b30caca4fd
1 changed files with 9 additions and 7 deletions
|
|
@ -128,6 +128,15 @@ void irq_set_pending(uint num) {
|
|||
#endif
|
||||
}
|
||||
|
||||
#if !PICO_NO_RAM_VECTOR_TABLE
|
||||
static void set_raw_irq_handler_and_unlock(uint num, irq_handler_t handler, uint32_t save) {
|
||||
// update vtable (vtable_handler may be same or updated depending on cases, but we do it anyway for compactness)
|
||||
get_vtable()[VTABLE_FIRST_IRQ + num] = handler;
|
||||
__dmb();
|
||||
spin_unlock(spin_lock_instance(PICO_SPINLOCK_ID_IRQ), save);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !PICO_DISABLE_SHARED_IRQ_HANDLERS && !PICO_NO_RAM_VECTOR_TABLE
|
||||
// limited by 8 bit relative links (and reality)
|
||||
static_assert(PICO_MAX_SHARED_IRQ_HANDLERS >= 1 && PICO_MAX_SHARED_IRQ_HANDLERS < 0x7f, "");
|
||||
|
|
@ -202,13 +211,6 @@ bool irq_has_shared_handler(uint irq_num) {
|
|||
return is_shared_irq_raw_handler(handler);
|
||||
}
|
||||
|
||||
static void set_raw_irq_handler_and_unlock(uint num, irq_handler_t handler, uint32_t save) {
|
||||
// update vtable (vtable_handler may be same or updated depending on cases, but we do it anyway for compactness)
|
||||
get_vtable()[VTABLE_FIRST_IRQ + num] = handler;
|
||||
__dmb();
|
||||
spin_unlock(spin_lock_instance(PICO_SPINLOCK_ID_IRQ), save);
|
||||
}
|
||||
|
||||
#else // PICO_DISABLE_SHARED_IRQ_HANDLERS && PICO_NO_RAM_VECTOR_TABLE
|
||||
#define is_shared_irq_raw_handler(h) false
|
||||
bool irq_has_shared_handler(uint irq_num) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue