#include <stdint.h>
Macros | |
#define | BTSTACK_SLIP_SOF 0xc0 |
Functions | |
uint16_t | btstack_slip_decoder_frame_size (void) |
Get size of decoded frame. More... | |
void | btstack_slip_decoder_init (uint8_t *buffer, uint16_t max_size) |
Initialise SLIP decoder with buffer. More... | |
void | btstack_slip_decoder_process (uint8_t input) |
Process received byte. More... | |
uint8_t | btstack_slip_encoder_get_byte (void) |
Get next byte from encoder. More... | |
int | btstack_slip_encoder_has_data (void) |
Check if encoder has data ready. More... | |
void | btstack_slip_encoder_start (const uint8_t *data, uint16_t len) |
Initialise SLIP encoder with data. More... | |
#define BTSTACK_SLIP_SOF 0xc0 |
uint16_t btstack_slip_decoder_frame_size | ( | void | ) |
Get size of decoded frame.
References decoder_pos, decoder_state, and SLIP_DECODER_COMPLETE.
Referenced by hci_transport_h5_block_received().
void btstack_slip_decoder_init | ( | uint8_t * | buffer, |
uint16_t | max_size | ||
) |
Initialise SLIP decoder with buffer.
buffer | to store received data |
max_size | of buffer |
References btstack_slip_decoder_reset(), buffer, decoder_buffer, and decoder_max_size.
Referenced by hci_transport_slip_init().
void btstack_slip_decoder_process | ( | uint8_t | input | ) |
Process received byte.
input | |
data |
References btstack_slip_decoder_reset(), btstack_slip_decoder_store_byte(), BTSTACK_SLIP_SOF, decoder_pos, decoder_state, log_error, SLIP_DECODER_ACTIVE, SLIP_DECODER_COMPLETE, SLIP_DECODER_UNKNOWN, SLIP_DECODER_X_C0, and SLIP_DECODER_X_DB.
Referenced by hci_transport_h5_block_received().
uint8_t btstack_slip_encoder_get_byte | ( | void | ) |
Get next byte from encoder.
References BTSTACK_SLIP_SOF, encoder_data, encoder_len, encoder_state, log_error, SLIP_ENCODER_DEFAULT, SLIP_ENCODER_SEND_DC, and SLIP_ENCODER_SEND_DD.
Referenced by hci_transport_slip_encode_chunk_and_send(), and hci_transport_slip_send_frame().
int btstack_slip_encoder_has_data | ( | void | ) |
Check if encoder has data ready.
References encoder_len, encoder_state, and SLIP_ENCODER_DEFAULT.
Referenced by hci_transport_h5_block_sent(), hci_transport_slip_encode_chunk_and_send(), and hci_transport_slip_send_frame().
void btstack_slip_encoder_start | ( | const uint8_t * | data, |
uint16_t | len | ||
) |
Initialise SLIP encoder with data.
data | |
len |
References encoder_data, encoder_len, encoder_state, and SLIP_ENCODER_DEFAULT.
Referenced by hci_transport_slip_encode_chunk_and_send(), and hci_transport_slip_send_frame().