30#define RX_HDLC_SYNC_MAX_BUFFER_SIZE 8192
35#define HDLC_SYNC_DEFAULT_SYNC_BYTE HDLC_FLAG_BYTE
e2s_error_t
Common error codes returned by ether2ser modules.
void hdlc_sync_acc_consume_candidate(HDLC_SYNC_ACCUMULATOR_T *accumulator, bool accept)
Consume current candidate and advance accumulator window.
#define RX_HDLC_SYNC_MAX_BUFFER_SIZE
Maximum raw RX bytes retained in the HDLC sync accumulator.
void hdlc_sync_acc_init(HDLC_SYNC_ACCUMULATOR_T *accumulator, uint8_t sync_byte)
Initialize HDLC sync accumulator state.
HDLC_SYNC_STATE_T
HDLC synchronizer state machine states.
@ HDLC_SYNC_STATE_HUNTING
@ HDLC_SYNC_STATE_SYNCING
e2s_error_t hdlc_sync_acc_poll(HDLC_SYNC_ACCUMULATOR_T *accumulator, HDLC_FRAME_T *out_frame)
Poll accumulator for an aligned HDLC frame candidate.
bool hdlc_sync_acc_process_byte(HDLC_SYNC_ACCUMULATOR_T *accumulator, uint8_t byte)
Append one received raw byte to the accumulator.
Generic HDLC frame buffer descriptor.
Accumulator and state for HDLC bit-offset synchronization.
uint32_t lookahead_wait_synced
uint32_t frame_ready_count
uint32_t hardcap_drop_bytes
uint32_t lookahead_wait_syncing
uint32_t hardcap_drop_events