当前位置:网站首页>uCOS-III学习笔记——软件定时器
uCOS-III学习笔记——软件定时器
2022-07-16 14:05:00 【你的先生_1016】
文章目录
一、如何创建软件定时器
void OSTmrCreate (OS_TMR *p_tmr,
CPU_CHAR *p_name,
OS_TICK dly,
OS_TICK period,
OS_OPT opt,
OS_TMR_CALLBACK_PTR p_callback,
void *p_callback_arg,
OS_ERR *p_err)
/*
参数解释
p_tmr:一个指向软件定时器控制块的指针
p_name:字符串,名字
dly:首次软件定时器进入中断的时间
period:连续模式下,后续进入中断的时间(不包括第一次)
opt:ONE-SHOT or PERIODIC:模式选择
p_callback_arg:回调函数指针->必须创建成这样void MyCallback (OS_TMR *p_tmr, void *p_arg);
p_err:错误值
*/二、使用步骤
1、软件定时器创建好的时候处于停止状态需要调用
CPU_BOOLEAN OSTmrStart (OS_TMR *p_tmr,
OS_ERR *p_err)2、停止
CPU_BOOLEAN OSTmrStop (OS_TMR *p_tmr,
OS_OPT opt,
void *p_callback_arg,
OS_ERR *p_err)
边栏推荐
- 鸿湖万联致远开发板正式合入OpenHarmony主干
- 网络爬虫实现发送短信验证码
- [玩转ES] ES批量/全量导入数据
- 2022 latest Tianjin Construction Safety Officer simulation question bank and answers
- js二分查找伪代码
- Error ora-01017 is reported after RMAN recovers
- Unity game file is large, how to reduce the game file
- C#-线程的加入 进度条加载案例,第一次视频效果的加入啦
- 质量与效率并重,测试左移助力块存储技术研发
- 【產品人衛朋】2022年產品人必備的13個設計類網站(1.0版)
猜你喜欢

2022 simulated 100 questions and simulated examination for the main principals of hazardous chemical business units

C#网络应用编程,实验5:数据流练习

C#求完全数,输出水仙花以及类的使用

Pytorch构建网络细节总结

勤于奋闲聊

2022 hoisting machinery command examination simulation 100 questions simulation examination platform operation

module ‘sklearn. datasets‘ has no attribute ‘fetch_ mldata‘

Huawei image xmage: seek all the images in the world, and finally see the Bodhi Heart

ECCV 2022 | open source for generative knowledge distillation of classification, detection and segmentation

MySQL超详细安装教程 手把手教你安装MySQL到使用MySQL 最简单的MySQL安装方式,这种方式装,卸载也简单
随机推荐
(斐波那契数列)使用函数输出指定范围内Fibonacc的数(PTA)
程序分析与优化 - 11 多分支分析
P1789 [MC survival] torch [introduction]
Question bank and answers of Shandong Provincial Safety Officer C certificate examination in 2022
Kaggle文件下载(权重、推理文件...)
2022.7.14-----leetcode.745
STL string
数据可视化之matplotlib绘制饼状图
Leetcode45. 跳跃游戏 II
26 top open source projects, 87 open tasks, Alibaba programming summer 2022 student registration channel opened
栈的基本操作
Leetcode48. 旋转图像
Log4j log configuration
HALCON联合C#检测表面缺陷——ROI交互(三)(和图片同步缩放裁剪等功能)
100% accuracy, Alibaba business travel billing system architecture design practice
ECCV 2022 | open source for generative knowledge distillation of classification, detection and segmentation
WordPress personal blog theme wp-reason-v1.0
队列的基本操作
Huawei image xmage: seek all the images in the world, and finally see the Bodhi Heart
An interesting keyboard bug debugging experience (I want to break my colleagues' legs)