Files
IronOS/source/Core/BSP/Pinecilv2/bl_irq.c
Ben V. Brown 03dd36898a
Some checks failed
CI / build (MHP30) (push) Has been cancelled
CI / build (Pinecil) (push) Has been cancelled
CI / build (Pinecilv2) (push) Has been cancelled
CI / build (S60) (push) Has been cancelled
CI / build (S60P) (push) Has been cancelled
CI / build (TS100) (push) Has been cancelled
CI / build (TS101) (push) Has been cancelled
CI / build (TS80) (push) Has been cancelled
CI / build (TS80P) (push) Has been cancelled
CI / build_multi-lang (Pinecil) (push) Has been cancelled
CI / build_multi-lang (Pinecilv2) (push) Has been cancelled
CI / tests (push) Has been cancelled
CI / check_c-cpp (push) Has been cancelled
CI / check_python (push) Has been cancelled
CI / check_shell (push) Has been cancelled
CI / check_readme (push) Has been cancelled
CI / upload_metadata (push) Has been cancelled
Rebase Buffalo SDK to 1.4.5 (#1923)
* Update bl702_adc.c

* Update board.c

* .

* Update bl702_adc.c

* Import updated hal_drv

* Remove accidental dupe of stack in linker

* First pass update BLE stack

* Update ReleaseNotes

* Update push.yml

* Drop BT Audio which we dont use

* .

* Reformat

* Update conn.c

* Update hog.c
2024-06-05 19:28:24 +10:00

30 lines
915 B
C

#include "bl_irq.h"
extern pFunc __Interrupt_Handlers[IRQn_LAST];
void bl_irq_enable(unsigned int source) { *(volatile uint8_t *)(CLIC_HART0_ADDR + CLIC_INTIE + source) = 1; }
void bl_irq_disable(unsigned int source) { *(volatile uint8_t *)(CLIC_HART0_ADDR + CLIC_INTIE + source) = 0; }
void bl_irq_pending_set(unsigned int source) { *(volatile uint8_t *)(CLIC_HART0_ADDR + CLIC_INTIP + source) = 1; }
void bl_irq_pending_clear(unsigned int source) { *(volatile uint8_t *)(CLIC_HART0_ADDR + CLIC_INTIP + source) = 0; }
void bl_irq_register(int irqnum, void *handler) {
if (irqnum < IRQn_LAST) {
__Interrupt_Handlers[irqnum] = handler;
}
}
void bl_irq_unregister(int irqnum, void *handler) {
if (irqnum < IRQn_LAST) {
__Interrupt_Handlers[irqnum] = NULL;
}
}
void bl_irq_handler_get(int irqnum, void **handler) {
if (irqnum < IRQn_LAST) {
*handler = __Interrupt_Handlers[irqnum];
}
}