当前位置:网站首页>UCOSII (learning notes)
UCOSII (learning notes)
2022-06-23 09:12:00 【July meteor】
ucosii Embedded system
characteristic : Suitable for small control systems , High efficiency of execution , Small footprint , Excellent real-time performance and strong scalability .
1. Declaration of the task stack :
ucos-ii Create a separate task stack for each task , And the task stack needs to be declared by the user , The data type is OS_STK, Stack structure is generally implemented by array .
#define TASK_STK_SIZE 512
OS_STK TaskStk[N_TASKS][TASK_STK_SIZE]; // Stack Size
2. Declaration of random semaphores :
Before building a semaphore , You need to declare a OS_EVENT* Type pointer , Used to store only event control blocks ECB The address of .
OS_EVENT *RandomSem;
3. Task and function prototype declaration :
Declare the task function , It doesn't mean that a task is a function , Just borrow the form of function .
(1) Mission statement :
void Task(void *data); // Create task array
void TaskStart(void *data); // Task start
(2) Function declaration :
static void TaskStartCreateTasks(void); // Set up tasks
static void TaskStartDispInit(void); // Task initialization
4.main function
complete ucos-ii System initialization ,DOS Environmental preservation , Interrupt vector setting , Appoint ucos-ii Task switching processing function in , Resume of first task and start multi task system .
边栏推荐
- Redis learning notes - client communication protocol resp
- [event registration] sofastack × CSDN jointly held the open source series meetup, which was launched on June 24
- '教练,我想打篮球!' —— 给做系统的同学们准备的 AI 学习系列小册
- 16.系统启动流程
- 【活动报名】SOFAStack × CSDN 联合举办开源系列 Meetup ,6 月 24 日火热开启
- Basic use of lua
- 如何在 FlowUs、Notion 等笔记软件中使用「番茄工作法」?
- MQTT+Flink实现实时消息的订阅与发布
- A method of realizing video call and interactive live broadcast in small programs
- Longest substring without repeated characters (C language)
猜你喜欢
随机推荐
A method of realizing video call and interactive live broadcast in small programs
Redis学习笔记—慢查询分析
The fourth online workshop review
Redis learning notes pipeline
Intelligent operation and maintenance exploration | anomaly detection method in cloud system
JS mask important data of ID card and mobile phone number with * *
Click Add drop-down box
通用分页(1)
学习SCI论文绘制技巧(F)
Redis learning notes - single key management
Redis learning notes - slow query analysis
Simple student management
【NanoPi2试用体验】裸机第一步
Learn SCI thesis drawing skills (E)
Redis learning notes - redis and Lua
Mqtt+flink to subscribe and publish real-time messages
Ionic5 form input box and radio button
文件的打开新建与存储
MySQL故障案例 | mysqldump: Couldn’t execute ‘SELECT COLUMN_NAME
Zone d'entrée du formulaire ionic5 et boutons radio




