A small and tested C implementation of the CRSF protocol for UART links with no dynamic allocation or external dependencies.
- Frame build and parse helpers for supported frame types:
- Channels
- GPS
- Link Statistics
- Battery Sensor
- Attitude
- MSP Request/Response
- Lightweight streaming parser.
crsf.hPublic API and protocol definitions.crsf.cCore implementation.crsf_parser.hHeader-only streaming parser.
Initialise the parser.
crsf_parser_t parser;
crsf_parser_init(&parser, CRSF_ADDRESS_FC, on_crsf_frame);Feed incoming UART bytes.
crsf_parser_feed(&parser, rx_buffer, rx_len);Build and send frames.
crsf_build_payload_channels(payload, &channels);
crsf_build_frame_channels(frame, CRSF_ADDRESS_RX, payload);Based on the CRSF protocol specification.