add the comment of irq.c
* 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,8 +61,9 @@ 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
*
@@ -74,8 +83,9 @@ 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
*
@@ -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)
{
