CC1310 RTC
来源:互联网 发布:程序员小品剧本 编辑:程序博客网 时间:2024/06/06 00:20
The RTC is used by TI-RTOS as the time base for the ti.sysbios.Clock module. It continues to run even when the processor is in standby mode and will wake the processor whenever a Clock object times out.
Clock objects are used to implement the timeouts for BIOS APIs such as Task_sleep(), Semaphore_pend(), Event_pend(), etc. They are also used internally by various TI-RTOS driver functions when a timeout is required.
Clock objects are used to implement the timeouts for BIOS APIs such as Task_sleep(), Semaphore_pend(), Event_pend(), etc. They are also used internally by various TI-RTOS driver functions when a timeout is required.
The RTC is also used as the timebase for the ti.sysbios.hal.Seconds module which can be used to provide time-of-day information to your application.
/* * ======== clock.c ======== *//* XDC module Headers */#include <xdc/std.h>#include <xdc/runtime/System.h>/* BIOS module Headers */#include <ti/sysbios/BIOS.h>#include <ti/sysbios/knl/Clock.h>/* Example/Board Header files */#include "Board.h"Void clk0Fxn(UArg arg0);Void clk1Fxn(UArg arg0);Clock_Struct clk0Struct, clk1Struct;Clock_Handle clk2Handle;/* * ======== main ======== */Int main(){ /* Construct BIOS Objects */ Clock_Params clkParams; /* Call driver init functions */ Board_initGeneral(); Clock_Params_init(&clkParams); clkParams.period = 5000/Clock_tickPeriod; clkParams.startFlag = TRUE; /* Construct a periodic Clock Instance */ Clock_construct(&clk0Struct, (Clock_FuncPtr)clk0Fxn, 5000/Clock_tickPeriod, &clkParams); clkParams.period = 0; clkParams.startFlag = FALSE; /* Construct a one-shot Clock Instance */ Clock_construct(&clk1Struct, (Clock_FuncPtr)clk1Fxn, 11000/Clock_tickPeriod, &clkParams); clk2Handle = Clock_handle(&clk1Struct); Clock_start(clk2Handle); BIOS_start(); /* does not return */ return(0);}/* * ======== clk0Fxn ======= */Void clk0Fxn(UArg arg0){ UInt32 time; time = Clock_getTicks(); System_printf("System time in clk0Fxn = %lu\n", (ULong)time);}/* * ======== clk1Fxn ======= */Void clk1Fxn(UArg arg0){ UInt32 time; time = Clock_getTicks(); System_printf("System time in clk1Fxn = %lu\n", (ULong)time); System_printf("Calling BIOS_exit() from clk1Fxn\n"); BIOS_exit(0);}
阅读全文
0 0
- CC1310 RTC
- CC1310 Timer
- RTC
- RTC
- RTC
- RTC
- RTC
- CC1310开发笔记-CY15B104Q
- CC1310笔记1:开发准备
- CC1310空中升级笔记03 CC1350_BLE_OAD_Project0
- CC1310 底噪测量以及实际意义
- RTC Driver
- RTC资料
- rtc驱动
- RTC/CTS
- lpc2103 rtc
- linux RTC
- linux RTC
- 成员变量和局部变量区别
- 分割整数
- jq选择器及方法
- 【脚本语言系列】关于Python基础知识枚举,你需要知道的事
- Java 字符串浮点数前后去多余的零
- CC1310 RTC
- Google map API Study(I)
- 每天五分钟linux(3)-pwd
- Spring:IoC 用法(七、<beans>用法)
- Android的touch事件分发的源码解析
- Java Web 知识汇总
- 数据结构和算法绪论
- Linux 环境安装IPvsadm+Keepalived 实现故障自动切换及负载均衡
- asp.net中的DES加密解密