skald.h¶
Skald’s basic interface.
-
SKALD_INTERVAL
¶ Static advertising interval.
1
(1 * US_PER_SEC)
-
SKALD_ADV_CHAN
¶ Static list of used advertising channels.
1
{ 37, 38, 39 }
-
void
skald_init
(void)¶ Initialize Skald and the underlying radio.
-
void
skald_adv_start
(skald_ctx_t * ctx)¶ Start advertising the given packet.
The packet will be send out each advertising interval (see SKALD_INTERVAL) on each of the defined advertising channels (see SKALD_ADV_CHAN).
Parameters
ctx: start advertising this context
-
void
skald_adv_stop
(skald_ctx_t * ctx)¶ Stop the ongoing advertisement.
Parameters
ctx: stop advertising this context
-
void
skald_generate_random_addr
(uint8_t * buf)¶ Generate a random public address.
Note
buf
must be able to hold BLE_ADDR_LEN (6) bytesParameters
buf: the generated address is written to this buffer
-
struct
skald_uuid_t
¶ UUID representation format used by Skald.
-
uint8_t
u8
()¶ UUID with byte-wise access.
-
uint8_t
-
struct
skald_ctx_t
¶ Advertising context holding the advertising data and state.
-
netdev_ble_pkt_t
pkt
¶ packet holding the advertisement (GAP) data
-
xtimer.h::xtimer_t
timer
¶ timer for scheduling advertising events
-
uint32_t
last
¶ last timer trigger (for offset compensation)
-
uint8_t
cur_chan
¶ keep track of advertising channels
-
netdev_ble_pkt_t