mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-23 09:41:03 +00:00
slip: fix encoder
This commit is contained in:
parent
4d6feae01a
commit
b5550b84bf
@ -102,7 +102,7 @@ uint8_t btstack_slip_encoder_get_byte(void){
|
|||||||
switch (encoder_state){
|
switch (encoder_state){
|
||||||
case SLIP_ENCODER_DEFAULT:
|
case SLIP_ENCODER_DEFAULT:
|
||||||
next_byte = *encoder_data++;
|
next_byte = *encoder_data++;
|
||||||
encoder_len++;
|
encoder_len--;
|
||||||
switch (next_byte){
|
switch (next_byte){
|
||||||
case BTSTACK_SLIP_SOF:
|
case BTSTACK_SLIP_SOF:
|
||||||
encoder_state = SLIP_ENCODER_SEND_DC;
|
encoder_state = SLIP_ENCODER_SEND_DC;
|
||||||
@ -115,8 +115,10 @@ uint8_t btstack_slip_encoder_get_byte(void){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SLIP_ENCODER_SEND_DC:
|
case SLIP_ENCODER_SEND_DC:
|
||||||
|
encoder_state = SLIP_ENCODER_DEFAULT;
|
||||||
return 0x0dc;
|
return 0x0dc;
|
||||||
case SLIP_ENCODER_SEND_DD:
|
case SLIP_ENCODER_SEND_DD:
|
||||||
|
encoder_state = SLIP_ENCODER_DEFAULT;
|
||||||
return 0x0dd;
|
return 0x0dd;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user