hdl_interrupt.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. #ifndef __HDL_INTERRUPT_H__
  12. #define __HDL_INTERRUPT_H__
  13. /* Includes ------------------------------------------------------------------*/
  14. /* Exported types ------------------------------------------------------------*/
  15. enum efm32_irq_hook_type_t
  16. {
  17. efm32_irq_type_dma = 0,
  18. efm32_irq_type_rtc,
  19. efm32_irq_type_timer,
  20. efm32_irq_type_letimer,
  21. efm32_irq_type_gpio,
  22. efm32_irq_type_acmp,
  23. efm32_irq_type_usart,
  24. efm32_irq_type_leuart,
  25. efm32_irq_type_iic
  26. };
  27. typedef void (*efm32_irq_callback_t)(rt_device_t device);
  28. typedef struct
  29. {
  30. enum efm32_irq_hook_type_t type;
  31. rt_uint8_t unit;
  32. efm32_irq_callback_t cbFunc;
  33. void *userPtr;
  34. } efm32_irq_hook_init_t;
  35. typedef struct
  36. {
  37. efm32_irq_callback_t cbFunc;
  38. void *userPtr;
  39. } efm32_irq_hook_t;
  40. /* Exported constants --------------------------------------------------------*/
  41. /* Exported macro ------------------------------------------------------------*/
  42. /* Exported functions ------------------------------------------------------- */
  43. //void NMI_Handler(void);
  44. //void MemManage_Handler(void);
  45. //void BusFault_Handler(void);
  46. //void UsageFault_Handler(void);
  47. //void SVC_Handler(void);
  48. //void DebugMon_Handler(void);
  49. void DMA_IRQHandler_All(rt_uint32_t channel, rt_bool_t primary, void *user);
  50. void efm32_irq_hook_register(efm32_irq_hook_init_t *hook);
  51. #endif /* __HDL_INTERRUPT_H__ */