Data Fields
lecb_sdu_t Struct Reference
BLE » Logical Link Control and Adaptation Protocol (L2CAP) » Structures

SDU packet parameter. More...

`#include <ble_l2cap.h>`

## Data Fields
uint16_t | cid
uint16_t | credits
uint16_t | length
uint8_t | data [__ARRAY_EMPTY]

## Detailed Description

SDU packet parameter.

Note
  The length should be less than peer_mtu when sending sdu packet.
  The credits is 0 if this packet is being sent, or it represents the number of credits consumed by this sdu if this packet is received.
  When the application receives a sdu, it should firstly copy this sdu packet before handling it, because the stack will free it after invoking the callback function.
  Similarly, the application should free the packet if it is malloced after invoking the function to send sdu packet.

## Field Documentation

## ◆ cid

uint16_t lecb_sdu_t::cid

The local source channel.

## ◆ credits

uint16_t lecb_sdu_t::credits

The credits is 0 if this packet is being sent, otherwise it represents the number of credits consumed by the sdu.

## ◆ data

uint8_t lecb_sdu_t::data[__ARRAY_EMPTY]

The data of this sdu packet.

## ◆ length

uint16_t lecb_sdu_t::length

The lenght of data.

The documentation for this struct was generated from the following file:

- ble_l2cap.h