当前位置:网站首页>Uc/os self-study from 0
Uc/os self-study from 0
2022-07-03 09:09:00 【Fat muscle duality】
uC/OS from 0 Start learning
OS initialization
OSInit(p_err)
Literally :
OSInitHook() ------------------- The interrupted stack space is cleared , Get the maximum address of interrupt stack space ;
OSIntNestingCtr --------------- Interrupt nesting reset ;
OSRunning ---------------------- Multitasking instructions
OSSchedLockNestingCtr ---- Lock nesting
OSTCBCurPtr ------------------- At present TCB The pointer
OSTCBHighRdyPtr
OSPrioCur ----------------------- Current priority
OSPrioHighRdy
OSPrioSaved
OS_CFG_SCHED_LOCK_TIME_MEAS_EN-------- Lock time measurement
OS_CFG_SCHED_ROUND_ROBIN_EN------------- Cyclic scheduling
OSSchedRoundRobinEn
OSSchedRoundRobinDfltTimeQuanta------------------ Default once 10 Time slice
if (OSCfg_ISRStkSize > (CPU_STK_SIZE)0) {------- Sense and OSInitHook() Function as
OS_CFG_APP_HOOKS_EN------------------------------ eliminate hook A function pointer
OS_CFG_TASK_REG_TBL_SIZE----------------------- Task register
OS_PrioInit(); ------------------------------------------------- Clear priority , An array assignment 0
OS_RdyListInit();--------------------------------------------- Initialize the ready list
OS_CFG_FLAG_EN ----------------------------------------event Sign module
OS_CFG_MEM_EN ----------------------------------------- Memory management module
OS_MSG_EN-------------------------------------------------
OS_CFG_MUTEX_EN ------------------------------------- Mutually exclusive management module
OS_CFG_Q_EN --------------------------------------------- Message queue management module
OS_TaskInit() ------------------------------------------------- Initialize task management
OS_CFG_ISR_POST_DEFERRED_EN --------------
OS_IdleTaskInit ---------------------------------------------- Create a idle Mission
OS_TickTaskInit --------------------------------------------- Create a tick Mission
OS_CFG_STAT_TASK_EN ------------------------------ Statistical tasks
OS_StatTaskInit() ------------------------------------------ Create a statistical task
OS_CFG_TMR_EN ---------------------------------------- Timer task
OS_TmrInit() ------------------------------------------------ Create a timer task
OS_CFG_DBG_EN ---------------------------------------debug Pattern
OS_Dbg_Init() ---------------------------------------------- Prevent the compiler from optimizing some unused variables
OSCfg_Init() ------------------------------------------------ The function annotation is the same as the function above
To be continued ……
Create a OSTask
OSTaskCreate
(
p_tcb------------- Pointer to the task control block , There are various parameter information of the task
p_name--------- String name of the task
p_task----------- Pointer to task code
p_arg------------ Parameters brought in when entering the function for the first time
prio--------------- priority , The smaller, the higher the priority
p_stk_base----- The lowest address of the task stack
stk_limit--------- Stack full limit
stk_size--------- Stack size , Company (CPU_STK)
q_size----------- The maximum number of messages sent to the task
time_quanta— The size of the time slice
p_ext------------TCB Expand memory
opt--------------- optional , nothing 、 Stack check 、 Stack cleanup 、 Floating point register 、TLS
p_err------------ Where to store the error code
)
边栏推荐
- 干货!零售业智能化管理会遇到哪些问题?看懂这篇文章就够了
- 【点云处理之论文狂读经典版9】—— Pointwise Convolutional Neural Networks
- Get the link behind? Parameter value after question mark
- Sword finger offer II 091 Paint the house
- Arbre DP acwing 285. Un bal sans patron.
- createjs easeljs
- LeetCode 508. 出现次数最多的子树元素和
- LeetCode 535. TinyURL 的加密与解密
- Introduction to the basic application and skills of QT
- Memory search acwing 901 skiing
猜你喜欢

Pic16f648a-e/ss PIC16 8-bit microcontroller, 7KB (4kx14)

Binary tree sorting (C language, char type)

【点云处理之论文狂读经典版10】—— PointCNN: Convolution On X-Transformed Points

Complex character + number pyramid

LeetCode 513. Find the value in the lower left corner of the tree

我们有个共同的名字,XX工

干货!零售业智能化管理会遇到哪些问题?看懂这篇文章就够了

Save the drama shortage, programmers' favorite high-score American drama TOP10

AcWing 785. Quick sort (template)

Excel is not as good as jnpf form for 3 minutes in an hour. Leaders must praise it when making reports like this!
随机推荐
Common penetration test range
【点云处理之论文狂读经典版14】—— Dynamic Graph CNN for Learning on Point Clouds
【点云处理之论文狂读经典版11】—— Mining Point Cloud Local Structures by Kernel Correlation and Graph Pooling
Facial expression recognition based on pytorch convolution -- graduation project
On a un nom en commun, maître XX.
【点云处理之论文狂读前沿版8】—— Pointview-GCN: 3D Shape Classification With Multi-View Point Clouds
On the difference and connection between find and select in TP5 framework
【点云处理之论文狂读前沿版10】—— MVTN: Multi-View Transformation Network for 3D Shape Recognition
file_ put_ contents
推荐一个 yyds 的低代码开源项目
Solution of 300ms delay of mobile phone
剑指 Offer II 091. 粉刷房子
Sword finger offer II 029 Sorted circular linked list
<, < <,>, > > Introduction in shell
PHP uses foreach to get a value in a two-dimensional associative array (with instances)
On the setting of global variable position in C language
We have a common name, XX Gong
Methods of checking ports according to processes and checking processes according to ports
DOM 渲染系统(render mount patch)响应式系统
Recommend a low code open source project of yyds