|
发表于 2015-7-17 14:27:38
只看该作者
沙发
不需要发送消息,app_qpps.c中app_qpps_data_send可以被usr_design.c调用,可以将需要发送的数据发送到手机端app中。- /*
- ****************************************************************************************
- * @brief Send a notification containing raw data - at connection. *//**
- *
- * @param[in] conhdl Connection handle
- * @param[in] index Index of Characteristic to be sent
- * @param[in] length Length of data to be sent
- * @param[in] data Pointer to data to be sent
- *
- * @response QPPS_DATA_SEND_CFM
- * @description
- * This function is used by the application to send a raw data.
- *
- ****************************************************************************************
- */
- void app_qpps_data_send(uint16_t conhdl, uint8_t index, uint8_t length, uint8_t *data)
- {
- struct qpps_data_send_req * msg = KE_MSG_ALLOC_DYN(QPPS_DATA_SEND_REQ, TASK_QPPS, TASK_APP,
- qpps_data_send_req, length);
- msg->conhdl = conhdl;
- msg->index = index;
- msg->length = length;
- memcpy(msg->data, data, length);
- ke_msg_send(msg);
- }
复制代码
|
|