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
31 lines
875 B
C
31 lines
875 B
C
/**
|
|
* @file radio.h
|
|
* @brief RADIO peripheral driver -- NRF_1Mbit proprietary mode.
|
|
*/
|
|
#pragma once
|
|
#include <stdint.h>
|
|
|
|
/** @brief Configure the RADIO peripheral (mode, packet format, address, CRC, power, channel). */
|
|
void radio_init(void);
|
|
|
|
/**
|
|
* @brief Set the RF channel.
|
|
* @param ch Channel index 0-39, maps to 2400+ch MHz (MAP=0).
|
|
*/
|
|
void radio_set_channel(uint8_t ch);
|
|
|
|
/**
|
|
* @brief Transmit one packet synchronously.
|
|
*
|
|
* Loads @p data into the internal packet buffer, asserts TASKS_TXEN, and
|
|
* returns after EVENTS_END fires. The RADIO is DISABLED automatically via
|
|
* the END_DISABLE shortcut before the function returns.
|
|
*
|
|
* @param data Payload bytes.
|
|
* @param len Payload length (0-255 bytes).
|
|
*/
|
|
void radio_tx(const uint8_t *data, uint8_t len);
|
|
|
|
/** @brief Transmit a burst with FHSS hopping (not yet implemented). */
|
|
void radio_tx_burst(void);
|