Loading...
Searching...
No Matches
skald.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2018 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
42
43#include <stdint.h>
44
45#include "ztimer.h"
46#include "net/ble.h"
47#include "net/netdev/ble.h"
48
49#ifdef __cplusplus
50extern "C" {
51#endif
52
56#ifndef SKALD_ADV_CHAN
57#define SKALD_ADV_CHAN { 37, 38, 39 }
58#endif
59
63typedef struct {
64 uint8_t u8[16];
66
77
81void skald_init(void);
82
92
99
107void skald_generate_random_addr(uint8_t *buf);
108
109#ifdef __cplusplus
110}
111#endif
112
BLE specific adaption for the Netdev API.
void skald_adv_start(skald_ctx_t *ctx)
Start advertising the given packet.
void skald_init(void)
Initialize Skald and the underlying radio.
void skald_generate_random_addr(uint8_t *buf)
Generate a random public address.
void skald_adv_stop(skald_ctx_t *ctx)
Stop the ongoing advertisement.
uint32_t ztimer_now_t
type for ztimer_now() result
Definition ztimer.h:308
BLE packet structure (as defined by the BLE standard)
Definition ble.h:100
Advertising context holding the advertising data and state.
Definition skald.h:70
ztimer_t timer
timer for scheduling advertising events
Definition skald.h:72
uint32_t adv_itvl_ms
advertising interval [ms]
Definition skald.h:75
uint8_t cur_chan
keep track of advertising channels
Definition skald.h:74
netdev_ble_pkt_t pkt
packet holding the advertisement (GAP) data
Definition skald.h:71
ztimer_now_t last
last timer trigger (for offset compensation)
Definition skald.h:73
UUID representation format used by Skald.
Definition skald.h:63
uint8_t u8[16]
UUID with byte-wise access.
Definition skald.h:64
ztimer structure
Definition ztimer.h:316
General BLE values as defined by the BT standard.
ztimer API