ptt-fhss
Bare-metal PTT firmware for nRF52840 with FHSS
Loading...
Searching...
No Matches
radio.h
Go to the documentation of this file.
5#pragma once
6#include <stdbool.h>
7#include <stdint.h>
8
15typedef struct __attribute__((packed)) {
16 uint32_t slot;
17 uint8_t flags;
19
20#define PTT_FLAG_ACTIVE 0x01u
23void radio_init(void);
24
29void radio_set_channel(uint8_t ch);
30
41void radio_tx(const uint8_t *data, uint8_t len);
42
49void radio_tx_burst(void);
50
61bool radio_rx_burst(ptt_frame_t *frame_out);
static uint32_t slot
Definition fhss.c:15
ptt_frame_t
Definition radio.h:18
void radio_set_channel(uint8_t ch)
Set the RF channel.
Definition radio.c:101
void radio_tx_burst(void)
Transmit one FHSS hop: advance channel, send PTT frame, hold dwell time.
Definition radio.c:126
bool radio_rx_burst(ptt_frame_t *frame_out)
Receive one FHSS hop: advance channel, listen for FHSS_DWELL_MS ms.
Definition radio.c:142
void radio_tx(const uint8_t *data, uint8_t len)
Transmit one packet synchronously.
Definition radio.c:109
struct __attribute__((packed))
PTT packet transmitted on every FHSS hop.
Definition radio.h:15
void radio_init(void)
Configure the RADIO peripheral (mode, packet format, address, CRC, power).
Definition radio.c:59