Skip to content

cores: arduino: zephyrSerial: Add cast to suppress warning#144

Merged
DhruvaG2000 merged 1 commit intozephyrproject-rtos:nextfrom
soburi:zephyr_serial_warning
Feb 3, 2026
Merged

cores: arduino: zephyrSerial: Add cast to suppress warning#144
DhruvaG2000 merged 1 commit intozephyrproject-rtos:nextfrom
soburi:zephyr_serial_warning

Conversation

@soburi
Copy link
Copy Markdown
Member

@soburi soburi commented Jan 31, 2026

There is no practical concern that the baud rate will exceed 32-bit size,
so there is no problem with casting.

@soburi soburi changed the title Zephyr serial warning cores: arduino: zephyrSerial: Add cast to suppress warning Jan 31, 2026
@soburi soburi marked this pull request as ready for review February 1, 2026 13:48
Copilot AI review requested due to automatic review settings February 1, 2026 13:48
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR includes multiple unrelated changes bundled together. The title suggests it only adds a cast to suppress a warning in zephyrSerial.cpp, but it also significantly modifies CMakeLists.txt files across the project to support board revision-specific overlay files and update variant directory selection logic.

Changes:

  • Added explicit cast from unsigned long to uint32_t for baudrate in zephyrSerial.cpp
  • Modified root CMakeLists.txt to normalize board target names and update variant directory selection
  • Added conditional logic to all sample CMakeLists.txt files to support board revision-specific overlay files

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
cores/arduino/zephyrSerial.cpp Added cast to convert baud parameter from unsigned long to uint32_t
CMakeLists.txt Modified variant directory selection logic and added string replacement for NORMALIZED_BOARD_TARGET
samples/threads_arduino/CMakeLists.txt Added conditional logic to select board revision-specific overlay files
samples/spi_controller/CMakeLists.txt Added conditional logic to select board revision-specific overlay files
samples/serial_event/CMakeLists.txt Added conditional logic to select board revision-specific overlay files
samples/i2cdemo/CMakeLists.txt Added conditional logic to select board revision-specific overlay files
samples/hello_arduino/CMakeLists.txt Added conditional logic to select board revision-specific overlay files
samples/fade/CMakeLists.txt Added conditional logic to select board revision-specific overlay files
samples/button_press_led/CMakeLists.txt Added conditional logic to select board revision-specific overlay files
samples/blinky_arduino/CMakeLists.txt Added conditional logic to select board revision-specific overlay files
samples/attach_interrupt/CMakeLists.txt Added conditional logic to select board revision-specific overlay files
samples/analog_input/CMakeLists.txt Added conditional logic to select board revision-specific overlay files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CMakeLists.txt
Comment thread samples/threads_arduino/CMakeLists.txt
Comment thread samples/serial_event/CMakeLists.txt
Comment thread samples/fade/CMakeLists.txt
Comment thread samples/attach_interrupt/CMakeLists.txt
Comment thread samples/i2cdemo/CMakeLists.txt
Comment thread samples/hello_arduino/CMakeLists.txt
Comment thread samples/button_press_led/CMakeLists.txt
Comment thread samples/blinky_arduino/CMakeLists.txt
Comment thread cores/arduino/zephyrSerial.cpp Outdated
@soburi soburi marked this pull request as draft February 1, 2026 14:25
@soburi soburi force-pushed the zephyr_serial_warning branch from c3aa1cc to 2d40131 Compare February 3, 2026 10:56
@soburi soburi requested a review from Copilot February 3, 2026 11:26
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cores/arduino/zephyrSerial.cpp Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@soburi soburi marked this pull request as ready for review February 3, 2026 12:16
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>
@soburi soburi force-pushed the zephyr_serial_warning branch from 42c29a9 to 924c35b Compare February 3, 2026 13:29
@DhruvaG2000 DhruvaG2000 merged commit 396da38 into zephyrproject-rtos:next Feb 3, 2026
3 checks passed
@soburi soburi deleted the zephyr_serial_warning branch February 3, 2026 21:25
@soburi soburi mentioned this pull request Feb 14, 2026
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants