明明已经在SimpleBLEPeripheral.c里面include了hal_timer.h,但是编译器就是一直报错
HalTimer1Init (timer1CallBack);halTimer1SetChannelDuty (HAL_T1_CH0, 0x07F8);halTimer1SetChannelDuty (HAL_T1_CH1, 0x00F8);halTimer1SetChannelDuty (HAL_T1_CH2, 0x02F2);halTimer1SetChannelDuty (HAL_T1_CH3, 0x04F2);halTimer1SetChannelDuty (HAL_T1_CH4, 0x06F2);
我想用hal_timer的API让2540输出PWM
错误如下
Error[e46]: Undefined external "HalTimer1Init::?relay" referred in simpleBLEPeripheral ( C:\Texas Instruments\BLE-CC254x-1.4.0\Projects\ble\SimpleBLEPeripheral – 副本\CC2540DB\CC2540DK-MINI Keyfob\Obj\simpleBLEPeripheral.r51 )Error[e46]: Undefined external "halTimer1SetChannelDuty::?relay" referred in simpleBLEPeripheral ( C:\Texas Instruments\BLE-CC254x-1.4.0\Projects\ble\SimpleBLEPeripheral – 副本\CC2540DB\CC2540DK-MINI Keyfob\Obj\simpleBLEPeripheral.r51 )Error while running Linker
Susan Yang:
应该是没有定义的原因
Rocky Su:
回复 Susan Yang:
找到原因了,hal_timer.c那个文件里啥都没有,要用户自己实现…真搞不懂这写协议栈的工程师怎么想的,没实现还给头文件做啥…害我浪费了好多时间…
Yan:
回复 Rocky Su:
Rocky,
系统中默认只用了timer 2, 其他几个留给客户自己去发挥:)
尽请跟着datasheet 玩吧
have fun!
CQ JiMi:
师兄你也遇到这样的问题了吗?怎么解决的呢?我的问题是这个
Linking error: Error[e46]: Undefined external "handleKeys::?relay" referred in LocationProfile