77#ifndef NET_NETDEV_BLE_H
78#define NET_NETDEV_BLE_H
89#define NETDEV_BLE_PDU_MAXLEN (37U)
94#define NETDEV_BLE_CRC_MASK (0x00ffffff)
99#define NETDEV_BLE_CRC_OK (0x80000000)
104typedef struct __attribute__((packed)) {
Definitions low-level network driver interface.
#define NETDEV_BLE_PDU_MAXLEN
Maximum payload length of a standard BLE packet.
static int netdev_ble_recv(netdev_t *dev, netdev_ble_pkt_t *pkt)
Start listening for an incoming packet and write it into pkt.
static void netdev_ble_set_ctx(netdev_t *dev, netdev_ble_ctx_t *ctx)
Set the radio context for the given radio device.
static int netdev_ble_send(netdev_t *dev, netdev_ble_pkt_t *pkt)
Send the given packet on the next occasion.
static void netdev_ble_stop(netdev_t *dev)
Stop the ongoing RX/TX sequence.
@ NETOPT_BLE_CTX
(netdev_ble_ctx_t) set BLE radio context (channel, CRC, AA)
iolist structure definition
uint32_t u32
compact access
uint32_t crc
CRC: 3 LSB for CRC, most significant bit for RX state.
uint8_t chan
channel to use/used
BLE packet structure (as defined by the BLE standard)
uint8_t len
actual length of PDU
uint8_t flags
header flags
int(* send)(netdev_t *dev, const iolist_t *iolist)
Start transmission of the given frame and return directly.
int(* set)(netdev_t *dev, netopt_t opt, const void *value, size_t value_len)
Set an option value for a given network device.
int(* recv)(netdev_t *dev, void *buf, size_t len, void *info)
Drop a received frame, OR get the length of a received frame, OR get a received frame.
Structure to hold driver state.
const struct netdev_driver * driver
ptr to that driver's interface.