cc2640的从机如何自动使能notify功能?

2019-07-25 16:28发布

我在CC2541上看到这样一段程序,猜它应该是使能notify功能的函数
  1. /*********************************************************************
  2. * @fn          simpleProfile_HandleConnStatusCB
  3. *
  4. * [url=home.php?mod=space&uid=247401]@brief[/url]       Simple Profile link status change handler function.
  5. *
  6. * @param       connHandle - connection handle
  7. * @param       changeType - type of change
  8. *
  9. * [url=home.php?mod=space&uid=266161]@return[/url]      none
  10. */
  11. static void testProfile_HandleConnStatusCB( uint16 connHandle, uint8 changeType )
  12. {
  13.   // Make sure this is not loopback connection
  14.   if ( connHandle != LOOPBACK_CONNHANDLE )
  15.   {
  16.     // Reset Client Char Config if connection has dropped
  17.     if ( ( changeType == LINKDB_STATUS_UPDATE_REMOVED )      ||
  18.          ( ( changeType == LINKDB_STATUS_UPDATE_STATEFLAGS ) &&
  19.            ( !linkDB_Up( connHandle ) ) ) )
  20.     {
  21.       GATTServApp_InitCharCfg( connHandle, TestChar2Config );

  22.     }
  23.   }
  24. }
复制代码

但是我应用到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功能的请告诉小弟呗,感激不尽啊
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。