123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- extern "C" {
- typedef enum
- {
- SLIP_STATE_DECODING,
- SLIP_STATE_ESC_RECEIVED,
- SLIP_STATE_CLEARING_INVALID_PACKET
- } slip_read_state_t;
-
- typedef struct
- {
- slip_read_state_t state;
- uint8_t * p_buffer;
- uint32_t current_index;
- uint32_t buffer_len;
- } slip_t;
- ret_code_t slip_encode(uint8_t * p_output, uint8_t * p_input, uint32_t input_length, uint32_t * p_output_buffer_length);
- ret_code_t slip_decode_add_byte(slip_t * p_slip, uint8_t c);
- }
|