From 8a29f48fdd20d99efbfd174af2c0e4649da46d8b Mon Sep 17 00:00:00 2001 From: Joachim Naulet Date: Fri, 14 Jul 2023 08:14:40 +0200 Subject: [PATCH] demo: fix uart hal changes following issue #60 --- demo/adafruit-itsybitsy-m4/adafruit-itsybitsy-m4.c | 5 ++--- demo/arduino-due/arduino-due.c | 5 ++--- demo/arduino-mega2560/arduino-mega2560.c | 5 ++--- demo/arduino-uno/arduino-uno.c | 5 ++--- demo/attiny1607-cnano/attiny1607-cnano.c | 5 ++--- demo/attiny817-xplained/attiny817-xplained.c | 5 ++--- demo/curiosity-2.0-pic32mz-ef/curiosity-2.0-pic32mz-ef.c | 5 ++--- demo/raspberry-pico/raspberry-pico.c | 5 ++--- demo/sipeed-longan-nano/sipeed-longan-nano.c | 5 ++--- 9 files changed, 18 insertions(+), 27 deletions(-) diff --git a/demo/adafruit-itsybitsy-m4/adafruit-itsybitsy-m4.c b/demo/adafruit-itsybitsy-m4/adafruit-itsybitsy-m4.c index 828562b1..8bec8964 100644 --- a/demo/adafruit-itsybitsy-m4/adafruit-itsybitsy-m4.c +++ b/demo/adafruit-itsybitsy-m4/adafruit-itsybitsy-m4.c @@ -164,9 +164,8 @@ static int uart_init(/*@partial@*/ struct adafruit_itsybitsy_m4 *ctx) struct uart_settings UART_settings = { 115200ul, (size_t)8, - false, - false, - false, + UART_PAR_NONE, + UART_CSTOPB_1BIT }; (void)uart_atmel_sercom_init(&ctx->UART, ADDR_SERCOM3, CLOCK_SAME5X_SERCOM3_CORE); diff --git a/demo/arduino-due/arduino-due.c b/demo/arduino-due/arduino-due.c index 7bc404ee..127c1a54 100644 --- a/demo/arduino-due/arduino-due.c +++ b/demo/arduino-due/arduino-due.c @@ -332,9 +332,8 @@ static void arduino_due_init_communication(/*@partial@*/ struct arduino_due *ctx struct uart_settings UART_settings = { 9600ul, /* baudrate */ (size_t)8, /* character size */ - false, /* parenb */ - false, /* parodd */ - false /* cstopb */ + UART_PAR_NONE, + UART_CSTOPB_1BIT, }; (void)uart_sam3x_init(&SERIAL0, ADDR_UART, CLOCK_SAM3X_PMC_PERIPH(PID_UART)); diff --git a/demo/arduino-mega2560/arduino-mega2560.c b/demo/arduino-mega2560/arduino-mega2560.c index 5f33d67a..c98e72b2 100644 --- a/demo/arduino-mega2560/arduino-mega2560.c +++ b/demo/arduino-mega2560/arduino-mega2560.c @@ -179,9 +179,8 @@ static void arduino_mega2560_init_communication(/*@partial@*/ struct arduino_meg struct uart_settings UART_settings = { 9600ul, (size_t)8, - false, /* N */ - false, /* x */ - false /* 1 */ + UART_PAR_NONE, + UART_CSTOPB_1BIT }; (void)uart_avr_init(&ctx->SERIAL0, ADDR_USART0, CLOCK_ATMEGA2560_CLKIO); diff --git a/demo/arduino-uno/arduino-uno.c b/demo/arduino-uno/arduino-uno.c index 1f0163de..1b285390 100644 --- a/demo/arduino-uno/arduino-uno.c +++ b/demo/arduino-uno/arduino-uno.c @@ -72,9 +72,8 @@ static void arduino_uno_init_uart(/*@partial@*/ struct arduino_uno *ctx) struct uart_settings UART_settings = { 9600ul, (size_t)8, - false, /* N */ - false, /* x */ - false /* 1 */ + UART_PAR_NONE, + UART_CSTOPB_1BIT }; (void)uart_avr_init(&ctx->SERIAL, ADDR_USART, CLOCK_ATMEGA328P_CLKIO); diff --git a/demo/attiny1607-cnano/attiny1607-cnano.c b/demo/attiny1607-cnano/attiny1607-cnano.c index f74789a8..9a4bd49d 100644 --- a/demo/attiny1607-cnano/attiny1607-cnano.c +++ b/demo/attiny1607-cnano/attiny1607-cnano.c @@ -63,9 +63,8 @@ static int uart_init(/*@partial@*/ struct attiny1607_cnano *ctx) const struct uart_settings UART_settings = { 9600ul, (size_t)8, - false, /* N */ - false, /* - */ - false, /* 1 */ + UART_PAR_NONE, + UART_CSTOPB_1BIT, }; (void)uart_tinyavr_usart_init(&ctx->UART, ADDR_USART0, CLOCK_TINYAVR_CLK_PER); diff --git a/demo/attiny817-xplained/attiny817-xplained.c b/demo/attiny817-xplained/attiny817-xplained.c index e406a092..834081bf 100644 --- a/demo/attiny817-xplained/attiny817-xplained.c +++ b/demo/attiny817-xplained/attiny817-xplained.c @@ -57,9 +57,8 @@ static int uart_init(/*@partial@*/ struct attiny817_xplained *ctx) const struct uart_settings UART_settings = { 9600ul, (size_t)8, - false, /* N */ - false, /* - */ - false, /* 1 */ + UART_PAR_NONE, + UART_CSTOPB_1BIT }; (void)uart_tinyavr_usart_init(&ctx->UART, ADDR_USART0, CLOCK_TINYAVR_CLK_PER); diff --git a/demo/curiosity-2.0-pic32mz-ef/curiosity-2.0-pic32mz-ef.c b/demo/curiosity-2.0-pic32mz-ef/curiosity-2.0-pic32mz-ef.c index b27c8f1b..41c9848b 100644 --- a/demo/curiosity-2.0-pic32mz-ef/curiosity-2.0-pic32mz-ef.c +++ b/demo/curiosity-2.0-pic32mz-ef/curiosity-2.0-pic32mz-ef.c @@ -92,9 +92,8 @@ static int uart_init(/*@partial@*/ struct curiosity_20_pic32mz_ef *ctx) const struct uart_settings UART_settings = { 9600ul, (size_t)8, - false, /* N */ - false, /* - */ - false, /* 1 */ + UART_PAR_NONE, + UART_CSTOPB_1BIT }; (void)uart_pic32mx_init(&ctx->UART1, ADDR_UART1, CLOCK_PIC32MX_PBCLK2); diff --git a/demo/raspberry-pico/raspberry-pico.c b/demo/raspberry-pico/raspberry-pico.c index 10e257e7..79a3b781 100644 --- a/demo/raspberry-pico/raspberry-pico.c +++ b/demo/raspberry-pico/raspberry-pico.c @@ -94,9 +94,8 @@ static void raspberry_pico_init_uart(/*@partial@*/ struct raspberry_pico *ctx) struct uart_settings UART_settings = { 9600ul, /* baudrate */ (size_t)8, /* character size */ - false, /* parenb */ - false, /* parodd */ - false /* cstopb */ + UART_PAR_NONE, + UART_CSTOPB_1BIT }; (void)rp2040_unreset(&RESET, RP2040_RESET_UART0); diff --git a/demo/sipeed-longan-nano/sipeed-longan-nano.c b/demo/sipeed-longan-nano/sipeed-longan-nano.c index d10078e7..871a96e8 100644 --- a/demo/sipeed-longan-nano/sipeed-longan-nano.c +++ b/demo/sipeed-longan-nano/sipeed-longan-nano.c @@ -113,9 +113,8 @@ static int uart_init(/*@partial@*/ struct sipeed_longan_nano *ctx) struct uart_settings UART_settings = { 9600ul, /* baudrate */ (size_t)8, /* character size */ - false, /* parenb */ - false, /* parodd */ - false /* cstopb */ + UART_PAR_NONE, + UART_CSTOPB_1BIT, }; (void)uart_gd32vf103_init(&ctx->USART0, ADDR_USART0, CLOCK_GD32VF103_APB2);