Go to the documentation of this file.
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)
104 typedef struct __attribute__((packed)) {
int(* send)(netdev_t *dev, const iolist_t *iolist)
Send frame.
const struct netdev_driver * driver
ptr to that driver's interface.
uint8_t len
actual length of PDU
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_recv(netdev_t *dev, netdev_ble_pkt_t *pkt)
Start listening for an incoming packet and write it into pkt.
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.
uint8_t chan
channel to use/used
uint32_t crc
CRC: 3 LSB for CRC, most significant bit for RX state.
uint8_t flags
header flags
Definitions low-level network driver interface.
iolist structure definition
@ NETOPT_BLE_CTX
(netdev_ble_ctx_t) set BLE radio context (channel, CRC, AA)
Structure to hold driver state.
static void netdev_ble_stop(netdev_t *dev)
Stop the ongoing RX/TX sequence.
uint32_t u32
compact access
#define NETDEV_BLE_PDU_MAXLEN
Maximum payload length of a standard BLE packet.
static int netdev_ble_send(netdev_t *dev, netdev_ble_pkt_t *pkt)
Send the given packet on the next occasion.
BLE packet structure (as defined by the BLE standard)