CC2650的时间事件函数的请教?
安装的是ble-stack2.1。
参考的例程是安装目录下面的simpleleperipheral。参考的是Software Developer’s GuideFor BLE-Stack™ Version: 2.1.0的讲述。
在例程里面没有找到 Clock.tickPeriod = 10;的定义。
请问这个定义函数是要自己加上去么?
3.4 Clocks
Clock Instances are functions that can be scheduled to run after a certain number of Clock ticks.
Clock instances are either one-shot or periodic. They are started immediately upon creation or
configured to start after a delay. They can also be stopped at any time. All Clock Instances are
executed when they expire in the context of a software interrupt.
The minimum resolution is the RTOS clock tick period which is set in the RTOS configuration:
/* 10 us tick period */
TI CC2640 Bluetooth ® low energy Software Developer’s Guide SWRU393A- July 2015
Copyright © 2010-2015 Texas Instruments, Inc.
Page 28 of 162
Clock.tickPeriod = 10;
请知道的告知下,谢谢。
在配置文件里,appBle.Cfg
我把这个工程simpleBLEPeripheral 打开,下载到smartrf06中。
我自己定义了一个全局变量a;仿真的时候发现a没有++,
所以猜测代码没有跑起来。具体不知道什么原因,您能解答下么?谢谢。 是不是我的clock.tickperiod 这个配置没有打开?
unsigned a = 0;
static void SimpleBLEPeripheral_performPeriodicTask(void)
{
#ifndef FEATURE_OAD
uint8_t valueToCopy;
// Call to retrieve the value of the third characteristic in the profile
if (SimpleProfile_GetParameter(SIMPLEPROFILE_CHAR3, &valueToCopy) == SUCCESS)
{
// Call to set that value of the fourth characteristic in the profile.
// Note that if notifications of the fourth characteristic have been
// enabled by a GATT client device, then a notification will be sent
// every time this function is called.
SimpleProfile_SetParameter(SIMPLEPROFILE_CHAR4, sizeof(uint8_t),
&valueToCopy);
a++;
}
#endif //!FEATURE_OAD
}
这个是已经配置好的么,需要我手动修改么?