File syn_dshot_telemetry.c¶
FileList > output > syn_dshot_telemetry.c
Go to the source code of this file
Zero-Heap Bidirectional DShot (BDShot) Telemetry Decoder Implementation.
#include "syntropic/output/syn_dshot_telemetry.h"#include "syntropic/output/syn_dshot.h"
Public Static Attributes¶
| Type | Name |
|---|---|
| const int8_t | gcr_to_nibble = /* multi line expression */ |
Public Functions¶
| Type | Name |
|---|---|
| SYN_Status | syn_dshot_decode_gcr_20bit (uint32_t gcr_20bit, uint16_t * payload_out) Decode 20-bit raw GCR bitstream into 16-bit BDShot telemetry payload. |
| SYN_Status | syn_dshot_parse_telemetry (uint32_t gcr_20bit, uint8_t pole_pairs, SYN_DShot_Telemetry * telemetry) Decode complete 20-bit BDShot GCR packet into telemetry measurements. |
Public Static Attributes Documentation¶
variable gcr_to_nibble¶
GCR (Group Code Recording) 5-bit to 4-bit nibble lookup table (-1 = invalid)
Public Functions Documentation¶
function syn_dshot_decode_gcr_20bit¶
Decode 20-bit raw GCR bitstream into 16-bit BDShot telemetry payload.
Parameters:
gcr_20bit20-bit raw GCR frame.payload_outPointer to receive 16-bit decoded payload ([15:4] period,[3:0] crc).
Returns:
SYN_OK on valid GCR decode, SYN_ERROR if invalid GCR symbol found.
function syn_dshot_parse_telemetry¶
Decode complete 20-bit BDShot GCR packet into telemetry measurements.
SYN_Status syn_dshot_parse_telemetry (
uint32_t gcr_20bit,
uint8_t pole_pairs,
SYN_DShot_Telemetry * telemetry
)
Parameters:
gcr_20bit20-bit raw GCR frame.pole_pairsMotor pole pairs (e.g., 14 poles = 7 pole pairs). Default 7 if 0.telemetryPointer to output telemetry structure.
Returns:
SYN_OK on valid decode and CRC, SYN_ERROR on bad GCR/CRC.
The documentation for this class was generated from the following file src/syntropic/output/syn_dshot_telemetry.c