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

ParameterDescription
[in] connHandleConnection handle to send the write response.
[in] p_respParamsPointer to the Write Response parameters (see GATTS_SendWriteRespParams_T).

Return values

Return valueDescription
MBA_RES_SUCCESSWrite response successfully started.
MBA_RES_FAILOperation not permitted; no corresponding write request received.
MBA_RES_OOMMemory allocation failure occurred internally.
MBA_RES_INVALID_PARAInvalid parameters; the connection handle is not valid.