mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 10:03:50 +01:00
net/slip: adapted to uart cb type change
This commit is contained in:
parent
368d96ccd1
commit
e855d63d84
@ -50,9 +50,9 @@
|
|||||||
#define _SLIP_DEV(arg) ((gnrc_slip_dev_t *)arg)
|
#define _SLIP_DEV(arg) ((gnrc_slip_dev_t *)arg)
|
||||||
|
|
||||||
/* UART callbacks */
|
/* UART callbacks */
|
||||||
static void _slip_rx_cb(void *arg, char data)
|
static void _slip_rx_cb(void *arg, uint8_t data)
|
||||||
{
|
{
|
||||||
if (data == _SLIP_END) {
|
if (data == (uint8_t)_SLIP_END) {
|
||||||
msg_t msg;
|
msg_t msg;
|
||||||
|
|
||||||
msg.type = _SLIP_MSG_TYPE;
|
msg.type = _SLIP_MSG_TYPE;
|
||||||
@ -66,14 +66,14 @@ static void _slip_rx_cb(void *arg, char data)
|
|||||||
_SLIP_DEV(arg)->in_esc = 0;
|
_SLIP_DEV(arg)->in_esc = 0;
|
||||||
|
|
||||||
switch (data) {
|
switch (data) {
|
||||||
case (_SLIP_END_ESC):
|
case ((uint8_t)_SLIP_END_ESC):
|
||||||
if (ringbuffer_add_one(&_SLIP_DEV(arg)->in_buf, _SLIP_END) < 0) {
|
if (ringbuffer_add_one(&_SLIP_DEV(arg)->in_buf, _SLIP_END) < 0) {
|
||||||
_SLIP_DEV(arg)->in_bytes++;
|
_SLIP_DEV(arg)->in_bytes++;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (_SLIP_ESC_ESC):
|
case ((uint8_t)_SLIP_ESC_ESC):
|
||||||
if (ringbuffer_add_one(&_SLIP_DEV(arg)->in_buf, _SLIP_ESC) < 0) {
|
if (ringbuffer_add_one(&_SLIP_DEV(arg)->in_buf, _SLIP_ESC) < 0) {
|
||||||
_SLIP_DEV(arg)->in_bytes++;
|
_SLIP_DEV(arg)->in_bytes++;
|
||||||
}
|
}
|
||||||
@ -84,7 +84,7 @@ static void _slip_rx_cb(void *arg, char data)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (data == _SLIP_ESC) {
|
else if (data == (uint8_t)_SLIP_ESC) {
|
||||||
_SLIP_DEV(arg)->in_esc = 1;
|
_SLIP_DEV(arg)->in_esc = 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user