GATTS_SendWriteResponse
C
uint16_t GATTS_SendWriteResponse(uint16_t connHandle, GATTS_SendWriteRespParams_T *p_respParams);
Description
Sends a write response from the GATT Server.
Note
This function sends a response for write, prepare write, or execute write requests as indicated by the ResponseType in GATTS_SendWriteRespParams_T. If the attribute's setting is SETTING_MANUAL_WRITE_RSP, the application will receive a GATTS_EVT_WRITE event when a write request is received. The application should then call this function to send the appropriate response or an error response if the request is not allowed.
Parameters
Parameter | Description |
---|---|
[in] connHandle | Connection handle to send the write response. |
[in] p_respParams | Pointer to the Write Response parameters (see GATTS_SendWriteRespParams_T). |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Write response successfully started. |
MBA_RES_FAIL | Operation not permitted; no corresponding write request received. |
MBA_RES_OOM | Memory allocation failure occurred internally. |
MBA_RES_INVALID_PARA | Invalid parameters; the connection handle is not valid. |