hdl_interrupt.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /***************************************************************************//**
  2. * @file hdl_interrupt.h
  3. * @brief Interrupt handler of RT-Thread RTOS for EFM32
  4. * COPYRIGHT (C) 2012, RT-Thread Development Team
  5. * @author onelife
  6. * @version 1.0
  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_letimer,
  27. efm32_irq_type_gpio,
  28. efm32_irq_type_acmp,
  29. efm32_irq_type_usart,
  30. efm32_irq_type_leuart,
  31. efm32_irq_type_iic
  32. };
  33. typedef void (*efm32_irq_callback_t)(rt_device_t device);
  34. typedef struct
  35. {
  36. enum efm32_irq_hook_type_t type;
  37. rt_uint8_t unit;
  38. efm32_irq_callback_t cbFunc;
  39. void *userPtr;
  40. } efm32_irq_hook_init_t;
  41. typedef struct
  42. {
  43. efm32_irq_callback_t cbFunc;
  44. void *userPtr;
  45. } efm32_irq_hook_t;
  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. #endif /* __HDL_INTERRUPT_H__ */