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

FHSS channel sequencer implementation. More...

#include "fhss.h"
#include <aes.h>

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.
 

Variables

static const uint8_t shared_key [16]
 
static uint32_t slot
 

Detailed Description

FHSS channel sequencer implementation.

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).

Variable Documentation

◆ shared_key

const uint8_t shared_key[16]
static
Initial value:
= {
0xA3, 0x4F, 0x2C, 0x8B, 0xE1, 0x76, 0x0D, 0x95, 0x4A, 0xB8, 0x3E, 0x72, 0x1F, 0xC9, 0x56, 0x0A,
}

◆ slot

uint32_t slot
static