mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #11638 from miri64/slipdev/enh/buffer-type
slipdev: make rxmem buffer uint8_t
This commit is contained in:
commit
e839aeb5d8
@ -61,7 +61,7 @@ typedef struct {
|
||||
netdev_t netdev; /**< parent class */
|
||||
slipdev_params_t config; /**< configuration parameters */
|
||||
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
|
||||
* byte */
|
||||
} slipdev_t;
|
||||
|
@ -44,7 +44,7 @@ static int _init(netdev_t *netdev)
|
||||
DEBUG("slipdev: initializing device %p on UART %i with baudrate %" PRIu32 "\n",
|
||||
(void *)dev, dev->config.uart, dev->config.baudrate);
|
||||
/* 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,
|
||||
dev) != UART_OK) {
|
||||
LOG_ERROR("slipdev: error initializing UART %i with baudrate %" PRIu32 "\n",
|
||||
|
Loading…
Reference in New Issue
Block a user