Files
nRF52840_PTT/include/radio.h
Krzysztof Cieślik 39a89036cc
Some checks failed
CI / Build firmware (push) Failing after 2m1s
CI / Check formatting (push) Successful in 5s
CI / Static analysis (push) Failing after 5s
CI / Build documentation (push) Successful in 4s
Add Doxygen, clang-format, cppcheck, and Gitea CI
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
2026-05-21 23:07:05 +02:00

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