hdl_interrupt.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /***************************************************************************//**
  2. * @file hdl_interrupt.h
  3. * @brief Interrupt handler of RT-Thread RTOS for EFM32
  4. * COPYRIGHT (C) 2011, RT-Thread Development Team
  5. * @author onelife
  6. * @version 0.4 beta
  7. *******************************************************************************
  8. * @section License
  9. * The license and distribution terms for this file may be found in the file
  10. * LICENSE in this distribution or at http://www.rt-thread.org/license/LICENSE
  11. *******************************************************************************
  12. * @section Change Logs
  13. * Date Author Notes
  14. * 2010-12-29 onelife Initial creation for EFM32
  15. * 2011-12-09 onelife Add LEUART module support
  16. ******************************************************************************/
  17. #ifndef __HDL_INTERRUPT_H__
  18. #define __HDL_INTERRUPT_H__
  19. /* Includes ------------------------------------------------------------------*/
  20. /* Exported types ------------------------------------------------------------*/
  21. enum efm32_irq_hook_type_t
  22. {
  23. efm32_irq_type_dma = 0,
  24. efm32_irq_type_rtc,
  25. efm32_irq_type_timer,
  26. efm32_irq_type_gpio,
  27. efm32_irq_type_acmp,
  28. efm32_irq_type_usart,
  29. efm32_irq_type_leuart,
  30. efm32_irq_type_iic
  31. };
  32. typedef void (*efm32_irq_callback_t)(rt_device_t device);
  33. typedef struct
  34. {
  35. enum efm32_irq_hook_type_t type;
  36. rt_uint8_t unit;
  37. efm32_irq_callback_t cbFunc;
  38. void *userPtr;
  39. } efm32_irq_hook_init_t;
  40. typedef struct
  41. {
  42. efm32_irq_callback_t cbFunc;
  43. void *userPtr;
  44. } efm32_irq_hook_t;
  45. /* Exported constants --------------------------------------------------------*/
  46. /* Exported macro ------------------------------------------------------------*/
  47. /* Exported functions ------------------------------------------------------- */
  48. //void NMI_Handler(void);
  49. //void MemManage_Handler(void);
  50. //void BusFault_Handler(void);
  51. //void UsageFault_Handler(void);
  52. //void SVC_Handler(void);
  53. //void DebugMon_Handler(void);
  54. void DMA_IRQHandler_All(rt_uint32_t channel, rt_bool_t primary, void *user);
  55. void efm32_irq_hook_register(efm32_irq_hook_init_t *hook);
  56. #endif /* __HDL_INTERRUPT_H__ */