我想要从SIMPLEPROFILE_CHAR4发送数据,但是发现程序执行到osal_memcpy这一句就停了,是我的参数不对吗?
unsigned char A_TX_DATA[12];
.
.
.
GetData(A_TX_DATA);
SimpleProfile_SetParameter(SIMPLEPROFILE_CHAR4, 12,A_TX_DATA);
.
.
.
bStatus_t SimpleProfile_SetParameter( uint8 param, uint8 len, void *value )
{bStatus_t ret = SUCCESS;switch ( param ){
.
.
.
case SIMPLEPROFILE_CHAR4:if ( len == sizeof ( uint8 ) ){simpleProfileChar4 = *((uint8*)value);// See if Notification has been enabledGATTServApp_ProcessCharCfg( simpleProfileChar4Config, &simpleProfileChar4, FALSE,simpleProfileAttrTbl, GATT_NUM_ATTRS( simpleProfileAttrTbl ),INVALID_TASK_ID, simpleProfile_ReadAttrCB );}else if(len == 12){uint8 client_gate_open;uint16 notify_Handle;GAPRole_GetParameter(0x30E,¬ify_Handle);client_gate_open = GATTServApp_ReadCharCfg(notify_Handle,simpleProfileChar4Config);if(client_gate_open & GATT_CLIENT_CFG_NOTIFY){static attHandleValueNoti_t pReport;pReport.handle = simpleProfileAttrTbl[11].handle;pReport.len = len;osal_memcpy( pReport.pValue,(uint8 *)value,len);GATT_Notification(notify_Handle,&pReport,FALSE);}}
Lei Mou:
哎哟,格式没搞好。
TI中文支持网


