drv_irq.h 705 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (C) 2021, lizhengyang
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-09-02 lizhengyang first version
  9. */
  10. #ifndef __DRV_IRQ_H__
  11. #define __DRV_IRQ_H__
  12. #include <rtdef.h>
  13. #include "hc32_ddl.h"
  14. /* C binding of definitions if building with C++ compiler */
  15. #ifdef __cplusplus
  16. extern "C"
  17. {
  18. #endif
  19. struct hc32_irq_config
  20. {
  21. IRQn_Type irq;
  22. uint32_t irq_prio;
  23. en_int_src_t int_src;
  24. };
  25. rt_err_t hc32_install_irq_handler(struct hc32_irq_config *irq_config,
  26. void (*irq_hdr)(void),
  27. rt_bool_t irq_enable);
  28. #ifdef __cplusplus
  29. }
  30. #endif
  31. #endif