hdl_interrupt.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /******************************************************************//**
  2. * @file hdl_interrupt.h
  3. * @brief USART driver 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 LICENSE in this
  10. * 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. *********************************************************************/
  16. #ifndef __HDL_INTERRUPT_H__
  17. #define __HDL_INTERRUPT_H__
  18. /* Includes ------------------------------------------------------------------*/
  19. /* Exported types ------------------------------------------------------------*/
  20. enum efm32_irq_hook_type_t
  21. {
  22. efm32_irq_type_dma = 0,
  23. efm32_irq_type_rtc,
  24. efm32_irq_type_timer,
  25. efm32_irq_type_gpio,
  26. efm32_irq_type_acmp,
  27. efm32_irq_type_usart,
  28. efm32_irq_type_iic
  29. };
  30. typedef void (*efm32_irq_callback_t)(rt_device_t device);
  31. typedef struct
  32. {
  33. enum efm32_irq_hook_type_t type;
  34. rt_uint8_t unit;
  35. efm32_irq_callback_t cbFunc;
  36. void *userPtr;
  37. } efm32_irq_hook_init_t;
  38. typedef struct
  39. {
  40. efm32_irq_callback_t cbFunc;
  41. void *userPtr;
  42. } efm32_irq_hook_t;
  43. /* Exported constants --------------------------------------------------------*/
  44. /* Exported macro ------------------------------------------------------------*/
  45. /* Exported functions ------------------------------------------------------- */
  46. //void NMI_Handler(void);
  47. //void MemManage_Handler(void);
  48. //void BusFault_Handler(void);
  49. //void UsageFault_Handler(void);
  50. //void SVC_Handler(void);
  51. //void DebugMon_Handler(void);
  52. void DMA_IRQHandler_All(unsigned int channel, bool primary, void *user);
  53. void efm32_irq_hook_register(efm32_irq_hook_init_t *hook);
  54. #endif /* __HDL_INTERRUPT_H__ */