From ed5e31fcaa54936ea7730f061c354e3e0f29a2f8 Mon Sep 17 00:00:00 2001 From: Thomas Roell Date: Mon, 17 Sep 2018 21:30:07 -0600 Subject: [PATCH] make "config" for Hardware serial a uint32_t type --- cores/stm32l4/CDC.cpp | 4 ++-- cores/stm32l4/HardwareSerial.h | 2 +- cores/stm32l4/USBAPI.h | 2 +- cores/stm32l4/Uart.cpp | 4 ++-- cores/stm32l4/Uart.h | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cores/stm32l4/CDC.cpp b/cores/stm32l4/CDC.cpp index aa5ee0bc..fbca22ee 100644 --- a/cores/stm32l4/CDC.cpp +++ b/cores/stm32l4/CDC.cpp @@ -72,10 +72,10 @@ CDC::CDC(struct _stm32l4_usbd_cdc_t *usbd_cdc, bool serialEvent) void CDC::begin(unsigned long baudrate) { - begin(baudrate, (uint8_t)SERIAL_8N1); + begin(baudrate, SERIAL_8N1); } -void CDC::begin(unsigned long baudrate, uint16_t config) +void CDC::begin(unsigned long baudrate, uint32_t config) { /* If USBD_CDC has already been enabled/initialized by STDIO, just add the notify. */ diff --git a/cores/stm32l4/HardwareSerial.h b/cores/stm32l4/HardwareSerial.h index 655bc84b..7f8d35f2 100644 --- a/cores/stm32l4/HardwareSerial.h +++ b/cores/stm32l4/HardwareSerial.h @@ -57,7 +57,7 @@ class HardwareSerial : public Stream { public: virtual void begin(unsigned long); - virtual void begin(unsigned long baudrate, uint16_t config); + virtual void begin(unsigned long baudrate, uint32_t config); virtual void end(); virtual int available(void) = 0; virtual int peek(void) = 0; diff --git a/cores/stm32l4/USBAPI.h b/cores/stm32l4/USBAPI.h index d4ccde73..479dc638 100644 --- a/cores/stm32l4/USBAPI.h +++ b/cores/stm32l4/USBAPI.h @@ -59,7 +59,7 @@ class CDC : public HardwareSerial public: CDC(struct _stm32l4_usbd_cdc_t *usbd_cdc, bool serialEvent); void begin(unsigned long baudRate); - void begin(unsigned long baudrate, uint16_t config); + void begin(unsigned long baudrate, uint32_t config); void end(void); int available(void); diff --git a/cores/stm32l4/Uart.cpp b/cores/stm32l4/Uart.cpp index 102caa69..c56c3284 100644 --- a/cores/stm32l4/Uart.cpp +++ b/cores/stm32l4/Uart.cpp @@ -61,7 +61,7 @@ void Uart::begin(unsigned long baudrate) begin(baudrate, SERIAL_8N1, &_rx_data[0], sizeof(_rx_data)); } -void Uart::begin(unsigned long baudrate, uint16_t config) +void Uart::begin(unsigned long baudrate, uint32_t config) { begin(baudrate, config, &_rx_data[0], sizeof(_rx_data)); } @@ -71,7 +71,7 @@ void Uart::begin(unsigned long baudrate, uint8_t *buffer, size_t size) begin(baudrate, SERIAL_8N1, buffer, size); } -void Uart::begin(unsigned long baudrate, uint16_t config, uint8_t *buffer, size_t size) +void Uart::begin(unsigned long baudrate, uint32_t config, uint8_t *buffer, size_t size) { if (_uart->state != UART_STATE_INIT) { flush(); diff --git a/cores/stm32l4/Uart.h b/cores/stm32l4/Uart.h index 3a3bf42e..20ed7de0 100644 --- a/cores/stm32l4/Uart.h +++ b/cores/stm32l4/Uart.h @@ -38,9 +38,9 @@ class Uart : public HardwareSerial public: Uart(struct _stm32l4_uart_t *uart, unsigned int instance, const struct _stm32l4_uart_pins_t *pins, unsigned int priority, unsigned int mode, bool serialEvent); void begin(unsigned long baudRate); - void begin(unsigned long baudrate, uint16_t config); + void begin(unsigned long baudrate, uint32_t config); void begin(unsigned long baudRate, uint8_t *buffer, size_t size); - void begin(unsigned long baudrate, uint16_t config, uint8_t *buffer, size_t size); + void begin(unsigned long baudrate, uint32_t config, uint8_t *buffer, size_t size); void end(); int available(); int availableForWrite(void);