nRF5 SDK v12.1.0
Macros | Functions
L2CAP Connectivity command request decoders and command response encoders

L2CAP Connectivity command request decoders and command response encoders. More...

Functions

uint32_t ble_l2cap_cid_register_req_dec (uint8_t const *const p_buf, uint32_t buf_len, uint16_t *p_cid)
 Decodes sd_ble_l2cap_cid_register command request. More...
 
uint32_t ble_l2cap_cid_register_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len)
 Encodes sd_ble_l2cap_cid_register command response. More...
 
uint32_t ble_l2cap_cid_unregister_req_dec (uint8_t const *const p_buf, uint32_t buf_len, uint16_t *p_cid)
 Decodes sd_ble_l2cap_cid_unregister command request. More...
 
uint32_t ble_l2cap_cid_unregister_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len)
 Encodes sd_ble_l2cap_cid_unregister command response. More...
 
uint32_t ble_l2cap_tx_req_dec (uint8_t const *const p_buf, uint32_t const buf_len, uint16_t *p_conn_handle, ble_l2cap_header_t **const pp_l2cap_header, uint8_t const **pp_data)
 Decodes sd_ble_l2cap_tx command request. More...
 
uint32_t ble_l2cap_tx_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len)
 Encodes sd_ble_l2cap_tx command response. More...
 

Detailed Description

L2CAP Connectivity command request decoders and command response encoders.

Function Documentation

uint32_t ble_l2cap_cid_register_req_dec ( uint8_t const *const  p_buf,
uint32_t  buf_len,
uint16_t *  p_cid 
)

Decodes sd_ble_l2cap_cid_register command request.

See Also
ble_l2cap_cid_register_rsp_enc for response encoding.
Parameters
[in]p_bufPointer to beginning of command request packet.
[in]buf_lenLength (in bytes) of response packet.
[in]p_cidPointer to L2CAP CID.
Return values
NRF_SUCCESSDecoding success.
NRF_ERROR_NULLDecoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHDecoding failure. Incorrect buffer length.
NRF_ERROR_INVALID_PARAMDecoding failure. Invalid operation type.
uint32_t ble_l2cap_cid_register_rsp_enc ( uint32_t  return_code,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len 
)

Encodes sd_ble_l2cap_cid_register command response.

See Also
ble_l2cap_cid_register_req_dec for request decoding.
Parameters
[in]return_codeReturn code indicating if command was successful or not.
[out]p_bufPointer to buffer where encoded data command response will be returned.
[in,out]p_buf_lenin: size of p_buf buffer. out: Length of encoded command response packet.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.
uint32_t ble_l2cap_cid_unregister_req_dec ( uint8_t const *const  p_buf,
uint32_t  buf_len,
uint16_t *  p_cid 
)

Decodes sd_ble_l2cap_cid_unregister command request.

See Also
ble_l2cap_cid_unregister_rsp_enc for response encoding.
Parameters
[in]p_bufPointer to beginning of command request packet.
[in]buf_lenLength (in bytes) of response packet.
[in]p_cidPointer to L2CAP CID.
Return values
NRF_SUCCESSDecoding success.
NRF_ERROR_NULLDecoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHDecoding failure. Incorrect buffer length.
NRF_ERROR_INVALID_PARAMDecoding failure. Invalid operation type.
uint32_t ble_l2cap_cid_unregister_rsp_enc ( uint32_t  return_code,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len 
)

Encodes sd_ble_l2cap_cid_unregister command response.

See Also
ble_l2cap_cid_unregister_req_dec for request decoding.
Parameters
[in]return_codeReturn code indicating if command was successful or not.
[out]p_bufPointer to buffer where encoded data command response will be returned.
[in,out]p_buf_lenin: size of p_buf buffer. out: Length of encoded command response packet.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.
uint32_t ble_l2cap_tx_req_dec ( uint8_t const *const  p_buf,
uint32_t const  buf_len,
uint16_t *  p_conn_handle,
ble_l2cap_header_t **const  pp_l2cap_header,
uint8_t const **  pp_data 
)

Decodes sd_ble_l2cap_tx command request.

See Also
ble_l2cap_tx_rsp_enc for response encoding.
Parameters
[in]p_bufPointer to beginning of command request packet.
[in]buf_lenLength (in bytes) of response packet.
[in]p_conn_handlePointer to connection handle.
[in]pp_l2cap_headerPointer to pointer to L2CAP header.
[in]pp_dataPointer to pointer L2CAP data.
Return values
NRF_SUCCESSDecoding success.
NRF_ERROR_NULLDecoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHDecoding failure. Incorrect buffer length.
NRF_ERROR_INVALID_PARAMDecoding failure. Invalid operation type.
uint32_t ble_l2cap_tx_rsp_enc ( uint32_t  return_code,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len 
)

Encodes sd_ble_l2cap_tx command response.

See Also
ble_l2cap_tx_req_dec for request decoding.
Parameters
[in]return_codeReturn code indicating if command was successful or not.
[out]p_bufPointer to buffer where encoded data command response will be returned.
[in,out]p_buf_lenin: size of p_buf buffer. out: Length of encoded command response packet.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.

Documentation feedback | Developer Zone | Subscribe | Updated