forked from Elron_dev/elbear_arduino_bsp
ready to alpha
подготовка к альфа-тестированию
This commit is contained in:
commit
e36b851783
164 files changed
+27352
No files matched your search
@@ -0,0 +1,33 @@
|
||||
#include "mik32_hal_irq.h"
|
||||
|
||||
// isr functions
|
||||
extern void serial_handler_wrapper(void);
|
||||
extern void gpio_interrupts_handler(void);
|
||||
extern void tone_interrupt_handler(void);
|
||||
void __attribute__((weak)) wire_handler_wrapper(void)
|
||||
{
|
||||
// dummy function for case when wire library is not in use
|
||||
}
|
||||
|
||||
// ---------------------------------------------- //
|
||||
void trap_handler(void)
|
||||
{
|
||||
// tone timer interrupt
|
||||
if (EPIC_CHECK_TIMER16_1())
|
||||
tone_interrupt_handler();
|
||||
|
||||
// uart interrupt
|
||||
if (EPIC_CHECK_UART_0())
|
||||
serial_handler_wrapper();
|
||||
|
||||
// gpio interrupt
|
||||
if (EPIC_CHECK_GPIO_IRQ())
|
||||
gpio_interrupts_handler();
|
||||
|
||||
// i2c interrupt
|
||||
if (EPIC_CHECK_I2C_1())
|
||||
wire_handler_wrapper();
|
||||
|
||||
// reset all interrupts
|
||||
HAL_EPIC_Clear(0xFFFFFFFF);
|
||||
}
|
||||
Reference in new issue
Block a user