Dear all
目前想要嘗試在模組上實現讓IO port high low的功能
所以在simple_peripheral專案中加入project_zero的led service
現在狀況可以正常編譯、搜尋
也可以發指令,並且正常接收
但是板子的led要等到中斷連線後才會動作
不知道有沒有前輩有類似經驗 可以提供一下方向的
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
这应该是移植的问题,
你把led_service.c 和led_service.h 放在你的工程目录下:
剩下就是注册服务之类的。应该不会有什么问题。
// Add services to GATT server and give ID of this task for Indication acks.
LedService_AddService(selfEntity);
// Register callbacks with the generated services that
// can generate events (writes received) to the application
LedService_RegisterAppCBs(&ProjectZero_LED_ServiceCBs);
LedService_SetParameter(LS_LED0_ID, LS_LED0_LEN, initVal);
LedService_SetParameter(LS_LED1_ID, LS_LED1_LEN, initVal)
下面这个能正常进入吗?
case SP_CHAR_CHANGE_EVT:
SimplePeripheral_processCharValueChangeEvt(*(uint8_t*)(pMsg->pData));