From 55f2eda956a86486d5f19089b35b633bc8c7e4db Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Sat, 13 Nov 2021 15:16:33 +0100 Subject: [PATCH] tests/periph_uart: fix periph type cast --- tests/periph_uart/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/periph_uart/main.c b/tests/periph_uart/main.c index 0a58ae7d09..e5475f519d 100644 --- a/tests/periph_uart/main.c +++ b/tests/periph_uart/main.c @@ -98,7 +98,7 @@ static void rxs_cb(void *arg) static void rx_cb(void *arg, uint8_t data) { - uart_t dev = (uart_t)arg; + uart_t dev = (uart_t)(uintptr_t)arg; ringbuffer_add_one(&ctx[dev].rx_buf, data); @@ -113,7 +113,7 @@ static int _self_test(uart_t dev, unsigned baud) { const char test_string[] = "Hello UART!"; - if (uart_init(UART_DEV(dev), baud, rx_cb, (void *)dev)) { + if (uart_init(UART_DEV(dev), baud, rx_cb, (void *)(uintptr_t)dev)) { printf("error configuring %u baud\n", baud); return -1; }