slipdev: make rxmem buffer uint8_t
`tsrb` changed to that type, so there is no reason for us, to keep the internally used buffer as a `char` (especially since the rest of the driver already uses `uint8_t`)
This commit is contained in:
parent
9b47dcb542
commit
f3ab285362
@ -61,7 +61,7 @@ typedef struct {
|
|||||||
netdev_t netdev; /**< parent class */
|
netdev_t netdev; /**< parent class */
|
||||||
slipdev_params_t config; /**< configuration parameters */
|
slipdev_params_t config; /**< configuration parameters */
|
||||||
tsrb_t inbuf; /**< RX buffer */
|
tsrb_t inbuf; /**< RX buffer */
|
||||||
char rxmem[SLIPDEV_BUFSIZE]; /**< memory used by RX buffer */
|
uint8_t rxmem[SLIPDEV_BUFSIZE]; /**< memory used by RX buffer */
|
||||||
uint16_t inesc; /**< device previously received an escape
|
uint16_t inesc; /**< device previously received an escape
|
||||||
* byte */
|
* byte */
|
||||||
} slipdev_t;
|
} slipdev_t;
|
||||||
|
|||||||
@ -44,7 +44,7 @@ static int _init(netdev_t *netdev)
|
|||||||
DEBUG("slipdev: initializing device %p on UART %i with baudrate %" PRIu32 "\n",
|
DEBUG("slipdev: initializing device %p on UART %i with baudrate %" PRIu32 "\n",
|
||||||
(void *)dev, dev->config.uart, dev->config.baudrate);
|
(void *)dev, dev->config.uart, dev->config.baudrate);
|
||||||
/* initialize buffers */
|
/* initialize buffers */
|
||||||
tsrb_init(&dev->inbuf, (uint8_t *)dev->rxmem, sizeof(dev->rxmem));
|
tsrb_init(&dev->inbuf, dev->rxmem, sizeof(dev->rxmem));
|
||||||
if (uart_init(dev->config.uart, dev->config.baudrate, _slip_rx_cb,
|
if (uart_init(dev->config.uart, dev->config.baudrate, _slip_rx_cb,
|
||||||
dev) != UART_OK) {
|
dev) != UART_OK) {
|
||||||
LOG_ERROR("slipdev: error initializing UART %i with baudrate %" PRIu32 "\n",
|
LOG_ERROR("slipdev: error initializing UART %i with baudrate %" PRIu32 "\n",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user