1 /* 2 * Copyright (c) 2006-2022, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2010-12-29 onelife Initial creation for EFM32 9 * 2011-12-09 onelife Add LEUART module support 10 */ 11 12 #ifndef __HDL_INTERRUPT_H__ 13 #define __HDL_INTERRUPT_H__ 14 15 /* Includes ------------------------------------------------------------------*/ 16 /* Exported types ------------------------------------------------------------*/ 17 enum efm32_irq_hook_type_t 18 { 19 efm32_irq_type_dma = 0, 20 efm32_irq_type_rtc, 21 efm32_irq_type_timer, 22 efm32_irq_type_letimer, 23 efm32_irq_type_gpio, 24 efm32_irq_type_acmp, 25 efm32_irq_type_usart, 26 efm32_irq_type_leuart, 27 efm32_irq_type_iic 28 }; 29 30 typedef void (*efm32_irq_callback_t)(rt_device_t device); 31 32 typedef struct 33 { 34 enum efm32_irq_hook_type_t type; 35 rt_uint8_t unit; 36 efm32_irq_callback_t cbFunc; 37 void *userPtr; 38 } efm32_irq_hook_init_t; 39 40 typedef struct 41 { 42 efm32_irq_callback_t cbFunc; 43 void *userPtr; 44 } efm32_irq_hook_t; 45 46 /* Exported constants --------------------------------------------------------*/ 47 /* Exported macro ------------------------------------------------------------*/ 48 /* Exported functions ------------------------------------------------------- */ 49 //void NMI_Handler(void); 50 //void MemManage_Handler(void); 51 //void BusFault_Handler(void); 52 //void UsageFault_Handler(void); 53 //void SVC_Handler(void); 54 //void DebugMon_Handler(void); 55 void DMA_IRQHandler_All(rt_uint32_t channel, rt_bool_t primary, void *user); 56 void efm32_irq_hook_register(efm32_irq_hook_init_t *hook); 57 58 #endif /* __HDL_INTERRUPT_H__ */ 59