標(biāo)題:
STM32F1-UCOSIII-master github上下載的項(xiàng)目
[打印本頁(yè)]
作者:
phang
時(shí)間:
2018-9-13 09:19
標(biāo)題:
STM32F1-UCOSIII-master github上下載的項(xiàng)目
stm32F1 uC/OS-III的
作為參考或?qū)W習(xí),可以看看
本人也想發(fā)帖賺點(diǎn)幣,嘻嘻
單片機(jī)源程序如下:
/*
************************************************************************************************************************
* uC/OS-III
* The Real-Time Kernel
*
* (c) Copyright 2009-2010; Micrium, Inc.; Weston, FL
* All rights reserved. Protected by international copyright laws.
*
* APPLICATION HOOKS
*
* File : OS_APP_HOOKS.C
* By : JJL
* Version : V3.01.2
*
* LICENSING TERMS:
* ---------------
* uC/OS-III is provided in source form to registered licensees ONLY. It is
* illegal to distribute this source code to any third party unless you receive
* written permission by an authorized Micrium representative. Knowledge of
* the source code may NOT be used to develop a similar product.
*
* Please help us continue to provide the Embedded community with the finest
* software available. Your honesty is greatly appreciated.
*
************************************************************************************************************************
*/
#include <os.h>
#include <os_app_hooks.h>
/*$PAGE*/
/*
************************************************************************************************************************
* SET ALL APPLICATION HOOKS
*
* Description: Set ALL application hooks.
*
* Arguments : none.
*
* Note(s) : none
************************************************************************************************************************
*/
void App_OS_SetAllHooks (void)
{
#if OS_CFG_APP_HOOKS_EN > 0u
CPU_SR_ALLOC();
CPU_CRITICAL_ENTER();
OS_AppTaskCreateHookPtr = App_OS_TaskCreateHook;
OS_AppTaskDelHookPtr = App_OS_TaskDelHook;
OS_AppTaskReturnHookPtr = App_OS_TaskReturnHook;
OS_AppIdleTaskHookPtr = App_OS_IdleTaskHook;
OS_AppStatTaskHookPtr = App_OS_StatTaskHook;
OS_AppTaskSwHookPtr = App_OS_TaskSwHook;
OS_AppTimeTickHookPtr = App_OS_TimeTickHook;
CPU_CRITICAL_EXIT();
#endif
}
/*$PAGE*/
/*
************************************************************************************************************************
* CLEAR ALL APPLICATION HOOKS
*
* Description: Clear ALL application hooks.
*
* Arguments : none.
*
* Note(s) : none
************************************************************************************************************************
*/
void App_OS_ClrAllHooks (void)
{
#if OS_CFG_APP_HOOKS_EN > 0u
CPU_SR_ALLOC();
CPU_CRITICAL_ENTER();
OS_AppTaskCreateHookPtr = (OS_APP_HOOK_TCB)0;
OS_AppTaskDelHookPtr = (OS_APP_HOOK_TCB)0;
OS_AppTaskReturnHookPtr = (OS_APP_HOOK_TCB)0;
OS_AppIdleTaskHookPtr = (OS_APP_HOOK_VOID)0;
OS_AppStatTaskHookPtr = (OS_APP_HOOK_VOID)0;
OS_AppTaskSwHookPtr = (OS_APP_HOOK_VOID)0;
OS_AppTimeTickHookPtr = (OS_APP_HOOK_VOID)0;
CPU_CRITICAL_EXIT();
#endif
}
/*$PAGE*/
/*
************************************************************************************************************************
* APPLICATION TASK CREATION HOOK
*
* Description: This function is called when a task is created.
*
* Arguments : p_tcb is a pointer to the task control block of the task being created.
*
* Note(s) : none
************************************************************************************************************************
*/
void App_OS_TaskCreateHook (OS_TCB *p_tcb)
{
(void)&p_tcb;
}
/*$PAGE*/
/*
************************************************************************************************************************
* APPLICATION TASK DELETION HOOK
*
* Description: This function is called when a task is deleted.
*
* Arguments : p_tcb is a pointer to the task control block of the task being deleted.
*
* Note(s) : none
************************************************************************************************************************
*/
void App_OS_TaskDelHook (OS_TCB *p_tcb)
{
(void)&p_tcb;
}
/*$PAGE*/
/*
************************************************************************************************************************
* APPLICATION TASK RETURN HOOK
*
* Description: This function is called if a task accidentally returns. In other words, a task should either be an
* infinite loop or delete itself when done.
*
* Arguments : p_tcb is a pointer to the OS_TCB of the task that is returning.
*
* Note(s) : none
************************************************************************************************************************
*/
void App_OS_TaskReturnHook (OS_TCB *p_tcb)
{
(void)&p_tcb;
}
/*$PAGE*/
/*
************************************************************************************************************************
* APPLICATION IDLE TASK HOOK
*
* Description: This function is called by the idle task. This hook has been added to allow you to do such things as
* STOP the CPU to conserve power.
*
* Arguments : none
*
* Note(s) : none
************************************************************************************************************************
*/
void App_OS_IdleTaskHook (void)
{
}
/*$PAGE*/
/*
************************************************************************************************************************
* APPLICATION OS INITIALIZATION HOOK
*
* Description: This function is called by OSInit() at the beginning of OSInit().
*
* Arguments : none
*
* Note(s) : none
************************************************************************************************************************
*/
void App_OS_InitHook (void)
{
}
/*$PAGE*/
/*
************************************************************************************************************************
* APPLICATION STATISTIC TASK HOOK
*
* Description: This function is called every second by uC/OS-III's statistics task. This allows your application to add
* functionality to the statistics task.
*
* Arguments : none
*
* Note(s) : none
************************************************************************************************************************
*/
void App_OS_StatTaskHook (void)
{
}
/*$PAGE*/
/*
************************************************************************************************************************
* APPLICATION TASK SWITCH HOOK
*
* Description: This function is called when a task switch is performed. This allows you to perform other operations
* during a context switch.
*
* Arguments : none
*
* Note(s) : 1) Interrupts are disabled during this call.
* 2) It is assumed that the global pointer 'OSTCBHighRdyPtr' points to the TCB of the task that will be
* 'switched in' (i.e. the highest priority task) and, 'OSTCBCurPtr' points to the task being switched out
* (i.e. the preempted task).
************************************************************************************************************************
*/
void App_OS_TaskSwHook (void)
{
}
/*$PAGE*/
/*
************************************************************************************************************************
* APPLICATION TICK HOOK
*
* Description: This function is called every tick.
*
* Arguments : none
*
* Note(s) : 1) This function is assumed to be called from the Tick ISR.
************************************************************************************************************************
*/
void App_OS_TimeTickHook (void)
{
}
復(fù)制代碼
所有資料51hei提供下載:
STM32F1-UCOSIII-master.zip
(658.51 KB, 下載次數(shù): 22)
2018-9-13 09:17 上傳
點(diǎn)擊文件名下載附件
下載積分: 黑幣 -5
作者:
wliuxiaoxiaow
時(shí)間:
2019-9-6 23:24
這是stm32F103的嗎
作者:
wliuxiaoxiaow
時(shí)間:
2019-9-6 23:24
這是stm32F103的嗎
歡迎光臨 (http://www.torrancerestoration.com/bbs/)
Powered by Discuz! X3.1