diff options
| author | supperthomas <[email protected]> | 2021-08-15 23:04:22 +0800 |
|---|---|---|
| committer | supperthomas <[email protected]> | 2021-08-15 23:04:22 +0800 |
| commit | 33a6700f160ce8c451b08287d12c94c9691556fc (patch) | |
| tree | 1ace5501cf165f58f4ae075ac363e04dc2fe75d3 | |
| parent | fea12e0903bf0d2e6efed7aa6838c28d1006e1f5 (diff) | |
add the comment of irq.c
| -rw-r--r-- | src/irq.c | 39 |
1 files changed, 25 insertions, 14 deletions
@@ -9,6 +9,7 @@ * 2006-05-03 Bernard add IRQ_DEBUG * 2016-08-09 ArdaFu add interrupt enter and leave hook. * 2018-11-22 Jesven rt_interrupt_get_nest function add disable irq + * 2021-08-15 Supperthomas fix the comment */ #include <rthw.h> @@ -21,19 +22,26 @@ static void (*rt_interrupt_leave_hook)(void); /** * @ingroup Hook - * This function set a hook function when the system enter a interrupt - * + * + * @brief This function set a hook function when the system enter a interrupt + * * @note the hook function must be simple and never be blocked or suspend. + * + * @param hook The function point to be called */ void rt_interrupt_enter_sethook(void (*hook)(void)) { rt_interrupt_enter_hook = hook; } + /** * @ingroup Hook - * This function set a hook function when the system exit a interrupt. - * + * + * @brief This function set a hook function when the system exit a interrupt. + * * @note the hook function must be simple and never be blocked or suspend. + * + * @param hook The function point to be called */ void rt_interrupt_leave_sethook(void (*hook)(void)) { @@ -53,11 +61,12 @@ void rt_interrupt_leave_sethook(void (*hook)(void)) volatile rt_uint8_t rt_interrupt_nest = 0; #endif /* RT_USING_SMP */ + /** - * This function will be invoked by BSP, when enter interrupt service routine - * + * @brief This function will be invoked by BSP, when enter interrupt service routine + * * @note please don't invoke this routine in application - * + * * @see rt_interrupt_leave */ void rt_interrupt_enter(void) @@ -74,11 +83,12 @@ void rt_interrupt_enter(void) } RTM_EXPORT(rt_interrupt_enter); + /** - * This function will be invoked by BSP, when leave interrupt service routine - * + * @brief This function will be invoked by BSP, when leave interrupt service routine + * * @note please don't invoke this routine in application - * + * * @see rt_interrupt_enter */ void rt_interrupt_leave(void) @@ -95,13 +105,14 @@ void rt_interrupt_leave(void) } RTM_EXPORT(rt_interrupt_leave); + /** - * This function will return the nest of interrupt. - * + * @brief This function will return the nest of interrupt. + * * User application can invoke this function to get whether current * context is interrupt context. - * - * @return the number of nested interrupts. + * + * @return rt_uint8_t the number of nested interrupts. */ RT_WEAK rt_uint8_t rt_interrupt_get_nest(void) { |
