ble-mac.h

Public API and definitions of Nordic Softdevice BLE.

BLE_IFACE_ADDED
1
(10000)
BLE_SIXLOWPAN_MTU
1
(1280U)
BLE_SIXLOWPAN_L2_ADDR_LEN
1
(8)
IPV6_IID_FLIP_VALUE
1
(0x02)
enum ble_mac_event_enum_t
BLE_EVENT_RX_DONE = 20000
void(* ble_mac_callback_t()

Mac event callback function definition.

int ble_mac_busy_tx

Flag is set to 1 when the driver is busy transmitting a packet.

int ble_mac_busy_rx

Flag is set to 1 when there is a received packet pending.

void ble_eui64_from_eui48(uint8_t eui64, uint8_t eui48, int _public)

Get BLE EUI64 from EUI48.

Parameters

eui64:The output EUI64 (8 bytes long)
eui48:The input EUI48 (6 bytes long)
_public:True if public interface, false otherwise

void ble_mac_init(ble-mac.h::ble_mac_callback_t callback)

Initialize the BLE mac.

Parameters

callback:The callback function triggered on mac event

int ble_mac_send(uint8_t dest, void * data, msp430_types.h::size_t len)

Send a BLE message.

Parameters

dest:The destination address
data:The data to send
len:The length of the data to send

Return values

  • 0 if send is successful
  • <0 if send failed
struct ble_mac_inbuf_t

Structure handling a received BLE mac packet.

uint8_t src()

Source address of the packet.

uint8_t payload()

Payload of the packet.

uint16_t len

Length of the packet.

int8_t rssi

RSSI of the received packet.