ptt-fhss
Bare-metal PTT firmware for nRF52840 with FHSS
Loading...
Searching...
No Matches
Macros | Functions
fhss.h File Reference

FHSS channel sequencer based on AES-128-ECB. More...

#include <stdint.h>

Go to the source code of this file.

Macros

#define FHSS_DWELL_MS   2u
 Dwell time per channel in milliseconds.
 
#define FHSS_CHANNELS   40u
 Number of channels in the hopping sequence.
 

Functions

void fhss_init (void)
 Reset the slot counter to zero.
 
uint8_t fhss_next_channel (void)
 Return the next channel in the hopping sequence and advance the slot.
 
void fhss_sync_tick (void)
 Advance the slot counter by one (receiver side, no packet received).
 
void fhss_set_slot (uint32_t s)
 Force the slot counter to a specific value for RX synchronisation.
 
uint32_t fhss_get_slot (void)
 Return the current slot counter value.
 

Detailed Description

FHSS channel sequencer based on AES-128-ECB.

Both link endpoints derive the same hopping sequence independently from a shared 128-bit key and a monotonically increasing slot counter. No synchronisation traffic is required as long as both sides start from the same slot.

Macro Definition Documentation

◆ FHSS_CHANNELS

#define FHSS_CHANNELS   40u

Number of channels in the hopping sequence.

◆ FHSS_DWELL_MS

#define FHSS_DWELL_MS   2u

Dwell time per channel in milliseconds.

Function Documentation

◆ fhss_get_slot()

uint32_t fhss_get_slot ( void  )

Return the current slot counter value.

◆ fhss_init()

void fhss_init ( void  )

Reset the slot counter to zero.

◆ fhss_next_channel()

uint8_t fhss_next_channel ( void  )

Return the next channel in the hopping sequence and advance the slot.

Returns
Channel index in [0, 39].

◆ fhss_set_slot()

void fhss_set_slot ( uint32_t  s)

Force the slot counter to a specific value for RX synchronisation.

Parameters
sNew slot value.

◆ fhss_sync_tick()

void fhss_sync_tick ( void  )

Advance the slot counter by one (receiver side, no packet received).