|
|
|
@ -420,33 +420,38 @@
|
|
|
|
|
* the threads creation APIs.
|
|
|
|
|
*/
|
|
|
|
|
# define CH_CFG_THREAD_INIT_HOOK(tp) \
|
|
|
|
|
{ /* Add threads initialization code here.*/ }
|
|
|
|
|
{ /* Add threads initialization code here.*/ \
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Threads finalization hook.
|
|
|
|
|
* @details User finalization code added to the @p chThdExit() API.
|
|
|
|
|
*/
|
|
|
|
|
# define CH_CFG_THREAD_EXIT_HOOK(tp) \
|
|
|
|
|
{ /* Add threads finalization code here.*/ }
|
|
|
|
|
{ /* Add threads finalization code here.*/ \
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Context switch hook.
|
|
|
|
|
* @details This hook is invoked just before switching between threads.
|
|
|
|
|
*/
|
|
|
|
|
# define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \
|
|
|
|
|
{ /* Context switch code here.*/ }
|
|
|
|
|
{ /* Context switch code here.*/ \
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief ISR enter hook.
|
|
|
|
|
*/
|
|
|
|
|
# define CH_CFG_IRQ_PROLOGUE_HOOK() \
|
|
|
|
|
{ /* IRQ prologue code here.*/ }
|
|
|
|
|
{ /* IRQ prologue code here.*/ \
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief ISR exit hook.
|
|
|
|
|
*/
|
|
|
|
|
# define CH_CFG_IRQ_EPILOGUE_HOOK() \
|
|
|
|
|
{ /* IRQ epilogue code here.*/ }
|
|
|
|
|
{ /* IRQ epilogue code here.*/ \
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Idle thread enter hook.
|
|
|
|
@ -455,7 +460,8 @@
|
|
|
|
|
* @note This macro can be used to activate a power saving mode.
|
|
|
|
|
*/
|
|
|
|
|
# define CH_CFG_IDLE_ENTER_HOOK() \
|
|
|
|
|
{ /* Idle-enter code here.*/ }
|
|
|
|
|
{ /* Idle-enter code here.*/ \
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Idle thread leave hook.
|
|
|
|
@ -464,14 +470,16 @@
|
|
|
|
|
* @note This macro can be used to deactivate a power saving mode.
|
|
|
|
|
*/
|
|
|
|
|
# define CH_CFG_IDLE_LEAVE_HOOK() \
|
|
|
|
|
{ /* Idle-leave code here.*/ }
|
|
|
|
|
{ /* Idle-leave code here.*/ \
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Idle Loop hook.
|
|
|
|
|
* @details This hook is continuously invoked by the idle thread loop.
|
|
|
|
|
*/
|
|
|
|
|
# define CH_CFG_IDLE_LOOP_HOOK() \
|
|
|
|
|
{ /* Idle loop code here.*/ }
|
|
|
|
|
{ /* Idle loop code here.*/ \
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief System tick event hook.
|
|
|
|
@ -479,7 +487,8 @@
|
|
|
|
|
* after processing the virtual timers queue.
|
|
|
|
|
*/
|
|
|
|
|
# define CH_CFG_SYSTEM_TICK_HOOK() \
|
|
|
|
|
{ /* System tick event code here.*/ }
|
|
|
|
|
{ /* System tick event code here.*/ \
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief System halt hook.
|
|
|
|
@ -487,7 +496,8 @@
|
|
|
|
|
* the system is halted.
|
|
|
|
|
*/
|
|
|
|
|
# define CH_CFG_SYSTEM_HALT_HOOK(reason) \
|
|
|
|
|
{ /* System halt code here.*/ }
|
|
|
|
|
{ /* System halt code here.*/ \
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Trace hook.
|
|
|
|
@ -495,7 +505,8 @@
|
|
|
|
|
* trace buffer.
|
|
|
|
|
*/
|
|
|
|
|
# define CH_CFG_TRACE_HOOK(tep) \
|
|
|
|
|
{ /* Trace code here.*/ }
|
|
|
|
|
{ /* Trace code here.*/ \
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** @} */
|
|
|
|
|
|
|
|
|
|