Doxygen: - Doxyfile: minimal config, HTML output to docs/, no LaTeX - @file/@brief on all source files, full @param/@return on public API - docs/ added to .gitignore clang-format (14, Linux brace style, 4-space, column 100): - .clang-format added - Applied to entire codebase; this commit is the canonical baseline - just format rewrites in-place; just format-check is the CI gate cppcheck (--enable=warning,style,performance,portability): - Linker-symbol pointer comparisons in startup.c suppressed with inline cppcheck-suppress (false positives, not real bugs) - just lint runs cppcheck; zero warnings required to pass Dockerfile gains clang-format, cppcheck, doxygen packages so all tools run inside the existing container -- host stays clean. Gitea Actions (.gitea/workflows/ci.yml): - Four parallel jobs: build, format, lint, docs - All jobs use the same Dockerfile-based image - Doxygen job fails on any warning line in output
28 lines
797 B
C
28 lines
797 B
C
/**
|
|
* @file fhss.h
|
|
* @brief 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.
|
|
*/
|
|
#pragma once
|
|
#include <stdint.h>
|
|
|
|
/** @brief Reset the slot counter to zero. */
|
|
void fhss_init(void);
|
|
|
|
/**
|
|
* @brief Return the next channel in the hopping sequence.
|
|
*
|
|
* Encrypts the current slot counter big-endian with AES-128-ECB, returns
|
|
* @c block[0] % 40, and advances the slot counter.
|
|
*
|
|
* @return Channel index in [0, 39].
|
|
*/
|
|
uint8_t fhss_next_channel(void);
|
|
|
|
/** @brief Advance the slot counter without transmitting (receiver side). */
|
|
void fhss_sync_tick(void);
|