当前位置:网站首页>ucosii(学习笔记)
ucosii(学习笔记)
2022-06-23 08:58:00 【七月流星.】
ucosii嵌入式系统
特点:适用于小型控制系统,具有执行效率高,占用空间小,实时性能优良和扩展性强等特点。
1.任务堆栈的声明:
ucos-ii为每个任务建立单独的任务堆栈,并且任务堆栈需要用户自行声明,数据类型为OS_STK,堆栈结构一般用数组来实现。
#define TASK_STK_SIZE 512
OS_STK TaskStk[N_TASKS][TASK_STK_SIZE]; //堆栈尺寸
2.随机信号量的声明:
建立一个信号量之前,需要声明一个OS_EVENT*型指针,用于存储只想事件控制块ECB的地址。
OS_EVENT *RandomSem;
3.任务及功能函数原型声明:
声明任务函数,并不代表任务就是函数,只是借用函数的形式。
(1)任务声明:
void Task(void *data); //创建任务数组
void TaskStart(void *data); //任务起始
(2)功能函数声明:
static void TaskStartCreateTasks(void); //建立任务
static void TaskStartDispInit(void); //任务初始化
4.main函数
完成ucos-ii系统初始化,DOS环境保存,中断向量设置,指定ucos-ii中的任务切换处理函数,首任务简历以及启动多任务系统。
边栏推荐
- The fourth online workshop review
- GeoServer adding mongodb data source
- MySQL fault case | mysqldump: couldn't execute 'select column_ NAME
- How to use matrix analysis to build your thinking scaffold in flowus, notation and other note taking software
- MQTT+Flink实现实时消息的订阅与发布
- How to restore visualizations and dashboards after kibana rebuilds the index
- 297. Serialize and Deserialize Binary Tree
- Combination sum II of leetcode topic analysis
- Unity grid programming 08
- 173. Binary Search Tree Iterator
猜你喜欢

Geoserver添加mongoDB数据源

简易学生管理

Quartz Crystal Drive Level Calculation

16.系统启动流程

Le rapport d'analyse de l'industrie chinoise des bases de données a été publié en juin. Le vent intelligent se lève, les colonnes se régénèrent

Flink error --caused by: org apache. calcite. sql. parser. SqlParseException: Encountered “time“

Jog运动模式

General paging (1)

力扣之滑动窗口《循序渐进》(209.长度最小的子数组、904. 水果成篮)

Object. Defineproperty() and data broker
随机推荐
Android kotlin coroutines KTX extension
523. Continuous Subarray Sum
Jog运动模式
一个采用直接映射方式的32KB缓存......存储器课后习题
3. caller service call - dapr
MySQL故障案例 | mysqldump: Couldn’t execute ‘SELECT COLUMN_NAME
297. Serialize and Deserialize Binary Tree
力扣之滑动窗口《循序渐进》(209.长度最小的子数组、904. 水果成篮)
How postman does interface testing 1: how to import swagger interface documents
GeoServer adding mongodb data source
Quartz Crystal Drive Level Calculation
Longest substring without repeated characters (C language)
栈(Stack)的链式实现详解----线性结构
[advanced Android] kotlin notes
[qnx hypervisor 2.2 user manual]6.1 using the QNX hypervisor system
Spirit matrix for leetcode topic analysis
Subsets II of leetcode topic analysis
636. Exclusive Time of Functions
Best time to buy and sell stock II
297. Serialize and Deserialize Binary Tree