Skip to content

Commit 924c35b

Browse files
committed
cores: arduino: zephyrSerial: Add cast to suppress warning
There is no practical concern that the baud rate will exceed 32-bit size, so there is no problem with casting. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
1 parent 7d51734 commit 924c35b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cores/arduino/zephyrSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ enum uart_config_data_bits conf_data_bits(uint16_t conf)
5656
void arduino::ZephyrSerial::begin(unsigned long baud, uint16_t conf)
5757
{
5858
struct uart_config config = {
59-
.baudrate = baud,
59+
.baudrate = static_cast<uint32_t>(baud),
6060
.parity = conf_parity(conf),
6161
.stop_bits = conf_stop_bits(conf),
6262
.data_bits = conf_data_bits(conf),

0 commit comments

Comments
 (0)