Skip to content

File syn_ble_att.c

FileList > ble > syn_ble_att.c

Go to the source code of this file

Zero-Heap Attribute Protocol (ATT) Implementation.

  • #include "syn_ble_att.h"
  • #include <string.h>

Public Functions

Type Name
SYN_Status syn_ble_att_encode_error_rsp (uint8_t req_opcode, uint16_t handle, uint8_t err_code, uint8_t * buf, uint16_t * len)
Encode ATT Error Response.
SYN_Status syn_ble_att_encode_mtu_rsp (uint16_t server_mtu, uint8_t * buf, uint16_t * len)
Encode ATT Exchange MTU Response.
SYN_Status syn_ble_att_encode_notification (uint16_t handle, const uint8_t * val, uint16_t val_len, uint8_t * buf, uint16_t * len)
Encode ATT Handle Value Notification.
SYN_Status syn_ble_att_encode_read_rsp (const uint8_t * val, uint16_t val_len, uint8_t * buf, uint16_t * len)
Encode ATT Read Response.
SYN_Status syn_ble_att_encode_write_rsp (uint8_t * buf, uint16_t * len)
Encode ATT Write Response.

Public Functions Documentation

function syn_ble_att_encode_error_rsp

Encode ATT Error Response.

SYN_Status syn_ble_att_encode_error_rsp (
    uint8_t req_opcode,
    uint16_t handle,
    uint8_t err_code,
    uint8_t * buf,
    uint16_t * len
) 

Parameters:

  • req_opcode Request Opcode.
  • handle Attribute Handle.
  • err_code Error Code.
  • buf Output Buffer.
  • len Output Length Pointer.

Returns:

SYN_OK on success.


function syn_ble_att_encode_mtu_rsp

Encode ATT Exchange MTU Response.

SYN_Status syn_ble_att_encode_mtu_rsp (
    uint16_t server_mtu,
    uint8_t * buf,
    uint16_t * len
) 

Parameters:

  • server_mtu Server MTU.
  • buf Output Buffer.
  • len Output Length Pointer.

Returns:

SYN_OK on success.


function syn_ble_att_encode_notification

Encode ATT Handle Value Notification.

SYN_Status syn_ble_att_encode_notification (
    uint16_t handle,
    const uint8_t * val,
    uint16_t val_len,
    uint8_t * buf,
    uint16_t * len
) 

Parameters:

  • handle Attribute Handle.
  • val Value bytes.
  • val_len Value length.
  • buf Output Buffer.
  • len Output Length Pointer.

Returns:

SYN_OK on success.


function syn_ble_att_encode_read_rsp

Encode ATT Read Response.

SYN_Status syn_ble_att_encode_read_rsp (
    const uint8_t * val,
    uint16_t val_len,
    uint8_t * buf,
    uint16_t * len
) 

Parameters:

  • val Value bytes.
  • val_len Value length.
  • buf Output Buffer.
  • len Output Length Pointer.

Returns:

SYN_OK on success.


function syn_ble_att_encode_write_rsp

Encode ATT Write Response.

SYN_Status syn_ble_att_encode_write_rsp (
    uint8_t * buf,
    uint16_t * len
) 

Parameters:

  • buf Output Buffer.
  • len Output Length Pointer.

Returns:

SYN_OK on success.



The documentation for this class was generated from the following file src/syntropic/ble/syn_ble_att.c