我在CC2541上看到这样一段程序,猜它应该是使能notify功能的函数
- /*********************************************************************
- * @fn simpleProfile_HandleConnStatusCB
- *
- * [url=home.php?mod=space&uid=247401]@brief[/url] Simple Profile link status change handler function.
- *
- * @param connHandle - connection handle
- * @param changeType - type of change
- *
- * [url=home.php?mod=space&uid=266161]@return[/url] none
- */
- static void testProfile_HandleConnStatusCB( uint16 connHandle, uint8 changeType )
- {
- // Make sure this is not loopback connection
- if ( connHandle != LOOPBACK_CONNHANDLE )
- {
- // Reset Client Char Config if connection has dropped
- if ( ( changeType == LINKDB_STATUS_UPDATE_REMOVED ) ||
- ( ( changeType == LINKDB_STATUS_UPDATE_STATEFLAGS ) &&
- ( !linkDB_Up( connHandle ) ) ) )
- {
- GATTServApp_InitCharCfg( connHandle, TestChar2Config );
- }
- }
- }
复制代码
但是我应用到CC2640上则一直报错说
Error[Li005]: no definition for "linkDB_Register" [referenced from C: isimplelinkle_cc26xx_2_01_00_44423ProjectsleSimpleBLEPeripheralCC26xxIARApplicationCC2640FlashROMObj estprofiles.o]
Error while running Linker
相应的头文件我已经包含进来了,不知道为何还会出错,如果各位大神知道cc2640从机如何自己使能notify功能的请告诉小弟呗,感激不尽啊
一周热门 更多>