Eric Ebert
/
CoOS
CoOS Demonstrator adapted to mbed Hardware.
hook.c@0:57690853989a, 2010-12-03 (annotated)
- Committer:
- ericebert
- Date:
- Fri Dec 03 19:45:30 2010 +0000
- Revision:
- 0:57690853989a
Some basic LED-Flashing works in the CoOS-RTOS using Tasks
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ericebert | 0:57690853989a | 1 | /** |
ericebert | 0:57690853989a | 2 | ******************************************************************************* |
ericebert | 0:57690853989a | 3 | * @file hook.c |
ericebert | 0:57690853989a | 4 | * @version V1.1.3 |
ericebert | 0:57690853989a | 5 | * @date 2010.04.26 |
ericebert | 0:57690853989a | 6 | * @brief hook management implementation code of CooCox CoOS kernel. |
ericebert | 0:57690853989a | 7 | ******************************************************************************* |
ericebert | 0:57690853989a | 8 | * @copy |
ericebert | 0:57690853989a | 9 | * |
ericebert | 0:57690853989a | 10 | * INTERNAL FILE,DON'T PUBLIC. |
ericebert | 0:57690853989a | 11 | * |
ericebert | 0:57690853989a | 12 | * <h2><center>© COPYRIGHT 2009 CooCox </center></h2> |
ericebert | 0:57690853989a | 13 | ******************************************************************************* |
ericebert | 0:57690853989a | 14 | */ |
ericebert | 0:57690853989a | 15 | |
ericebert | 0:57690853989a | 16 | |
ericebert | 0:57690853989a | 17 | /*---------------------------- Inlcude --------------------------------------*/ |
ericebert | 0:57690853989a | 18 | #include <coocox.h> |
ericebert | 0:57690853989a | 19 | |
ericebert | 0:57690853989a | 20 | /** |
ericebert | 0:57690853989a | 21 | ******************************************************************************* |
ericebert | 0:57690853989a | 22 | * @brief IDLE task of OS |
ericebert | 0:57690853989a | 23 | * @param[in] pdata The parameter passed to IDLE task. |
ericebert | 0:57690853989a | 24 | * @param[out] None |
ericebert | 0:57690853989a | 25 | * @retval None |
ericebert | 0:57690853989a | 26 | * |
ericebert | 0:57690853989a | 27 | * @par Description |
ericebert | 0:57690853989a | 28 | * @details This function is system IDLE task code. |
ericebert | 0:57690853989a | 29 | ******************************************************************************* |
ericebert | 0:57690853989a | 30 | */ |
ericebert | 0:57690853989a | 31 | void CoIdleTask(void* pdata) |
ericebert | 0:57690853989a | 32 | { |
ericebert | 0:57690853989a | 33 | /* Add your codes here */ |
ericebert | 0:57690853989a | 34 | for(; ;) |
ericebert | 0:57690853989a | 35 | { |
ericebert | 0:57690853989a | 36 | /* Add your codes here */ |
ericebert | 0:57690853989a | 37 | } |
ericebert | 0:57690853989a | 38 | } |
ericebert | 0:57690853989a | 39 | |
ericebert | 0:57690853989a | 40 | |
ericebert | 0:57690853989a | 41 | /** |
ericebert | 0:57690853989a | 42 | ******************************************************************************* |
ericebert | 0:57690853989a | 43 | * @brief Hook for stack overflow |
ericebert | 0:57690853989a | 44 | * @param[in] taskID Piont to the task which lead to stack overflow. |
ericebert | 0:57690853989a | 45 | * @param[out] None |
ericebert | 0:57690853989a | 46 | * @retval None |
ericebert | 0:57690853989a | 47 | * |
ericebert | 0:57690853989a | 48 | * @par Description |
ericebert | 0:57690853989a | 49 | * @details This function is a hook for stack overflow. |
ericebert | 0:57690853989a | 50 | ******************************************************************************* |
ericebert | 0:57690853989a | 51 | */ |
ericebert | 0:57690853989a | 52 | void CoStkOverflowHook(OS_TID taskID) |
ericebert | 0:57690853989a | 53 | { |
ericebert | 0:57690853989a | 54 | /* Process stack overflow here */ |
ericebert | 0:57690853989a | 55 | for(; ;) |
ericebert | 0:57690853989a | 56 | { |
ericebert | 0:57690853989a | 57 | |
ericebert | 0:57690853989a | 58 | } |
ericebert | 0:57690853989a | 59 | } |
ericebert | 0:57690853989a | 60 | |
ericebert | 0:57690853989a | 61 | |
ericebert | 0:57690853989a | 62 | |
ericebert | 0:57690853989a | 63 | |
ericebert | 0:57690853989a | 64 | |
ericebert | 0:57690853989a | 65 |