File syn_ibus.c¶
FileList > proto > syn_ibus.c
Go to the source code of this file
Zero-Heap IBUS (FlySky) 14-Channel Receiver Decoder Implementation.
#include "syntropic/proto/syn_ibus.h"#include <string.h>
Public Functions¶
| Type | Name |
|---|---|
| uint16_t | syn_ibus_calc_checksum (const uint8_t buf) Calculate IBUS 16-bit checksum. |
| SYN_Status | syn_ibus_init (SYN_IBUS_Parser * parser) Initialize IBUS parser. |
| SYN_Status | syn_ibus_parse_byte (SYN_IBUS_Parser * parser, uint8_t byte, SYN_IBUS_Frame * frame) Process single byte from serial RX stream. |
Public Functions Documentation¶
function syn_ibus_calc_checksum¶
Calculate IBUS 16-bit checksum.
Parameters:
bufPointer to 30 data bytes.
Returns:
16-bit expected checksum (0xFFFF - sum(bytes)).
function syn_ibus_init¶
Initialize IBUS parser.
Parameters:
parserPointer to parser struct.
Returns:
SYN_OK on success.
function syn_ibus_parse_byte¶
Process single byte from serial RX stream.
Parameters:
parserPointer to parser struct.byteIncoming byte.framePointer to output frame struct (populated when a valid 32-byte frame is decoded).
Returns:
SYN_OK on complete frame, SYN_BUSY if byte accepted but incomplete, SYN_ERROR on bad header/checksum.
The documentation for this class was generated from the following file src/syntropic/proto/syn_ibus.c