CC1310 Timer
来源:互联网 发布:淘宝卖家在哪里发微淘 编辑:程序博客网 时间:2024/06/08 12:21
// Convenience macro to make the code more readable// Set Clock.tickPeriod in the .cfg file#define Clock_convertSecondsToTicks(seconds) \ (((seconds) * 1000000) / (Clock_tickPeriod))// Solution 1// ----------// Reserve memory for the clock objectClock_Struct clock;uint32_t timeoutTicks = Clock_convertSecondsToTicks(30);// Create a one-shot timerClock_construct(&clock, &Serial_TimerCallback, timeoutTicks, NULL);// Start the timerClock_start(Clock_handle(&clock));// Solution 2// ----------uint32_t timeoutTicks = Clock_convertSecondsToTicks(30);// Create a one-shot timer somewhere on the heapClock_Handle clock = Clock_create(&Serial_TimerCallback, timeoutTicks, NULL, NULL);// Start the timerClock_start(clock);// Solution 3// ----------// Create a static clock object in the .cfg file// The init code is automatically generated by xdctoolsvar clock0Params = new Clock.Params();clock0Params.instance.name = "clock";Program.global.clock = Clock.create("&Serial_TimerCallback", 30, clock0Params);// Start the clock somewhere in your programextern const Clock_Handle clock;Clock_start(clock);
阅读全文
0 0
- CC1310 Timer
- CC1310 RTC
- CC1310开发笔记-CY15B104Q
- CC1310笔记1:开发准备
- timer
- Timer
- timer
- timer
- Timer
- Timer......
- timer
- TIMER
- TIMER
- TIMER
- timer
- Timer
- Timer
- timer
- 算法系列——Reorder List
- SMBus与I2C的区别
- 如何调整批注框文本的字体格式
- 需求实现:实现文本框多行展示时显示“全文”的操作
- Canvas 在高清屏下绘制图片变模糊的解决方法
- CC1310 Timer
- 文章标题
- mysql系统函数小结
- 浅谈对八数码及其扩展出来的康托算法影响
- sendmail安装使用
- java类加载器
- Android的消息机制之ThreadLocal的工作原理
- (纯干货)Windows Apache2.2怎么设置自动启动?
- bfs中的队列相关函数