Loading...
Searching...
No Matches
skald.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018 Freie Universität Berlin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
9#pragma once
10
45
46#include <stdint.h>
47
48#include "ztimer.h"
49#include "net/ble.h"
50#include "net/netdev/ble.h"
51
52#ifdef __cplusplus
53extern "C" {
54#endif
55
59#ifndef SKALD_ADV_CHAN
60#define SKALD_ADV_CHAN { 37, 38, 39 }
61#endif
62
66typedef struct {
67 uint8_t u8[16];
69
80
84void skald_init(void);
85
95
102
110void skald_generate_random_addr(uint8_t *buf);
111
112#ifdef __cplusplus
113}
114#endif
115
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:311
BLE packet structure (as defined by the BLE standard)
Definition ble.h:103
Advertising context holding the advertising data and state.
Definition skald.h:73
ztimer_t timer
timer for scheduling advertising events
Definition skald.h:75
uint32_t adv_itvl_ms
advertising interval [ms]
Definition skald.h:78
uint8_t cur_chan
keep track of advertising channels
Definition skald.h:77
netdev_ble_pkt_t pkt
packet holding the advertisement (GAP) data
Definition skald.h:74
ztimer_now_t last
last timer trigger (for offset compensation)
Definition skald.h:76
UUID representation format used by Skald.
Definition skald.h:66
uint8_t u8[16]
UUID with byte-wise access.
Definition skald.h:67
ztimer structure
Definition ztimer.h:319
General BLE values as defined by the BT standard.
ztimer API