1
0
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:
Martine Lenders 2019-06-06 11:22:38 +02:00 committed by GitHub
commit e839aeb5d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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",