Skip to content

cores: arduino: Format with clang-format#166

Open
soburi wants to merge 3 commits intozephyrproject-rtos:nextfrom
soburi:prepare_merge
Open

cores: arduino: Format with clang-format#166
soburi wants to merge 3 commits intozephyrproject-rtos:nextfrom
soburi:prepare_merge

Conversation

@soburi
Copy link
Member

@soburi soburi commented Feb 26, 2026

Use a formatter to standardize indentation.


Committing to reduce the diff in preparation for the merge.

Please approve #163 and #165 first.

facchinm and others added 3 commits February 17, 2026 18:05
experimental results here arduino#332 (comment)

On boards with different clock speed, function call overhead etc. the results may vary but will likely be consistent, given that all the boards share CONFIG_SYS_CLOCK_TICKS_PER_SEC

Co-authored-by: Martino Facchin <m.facchin@arduino.cc>
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Fixed to use %zu which corresponds to size_t.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Use a formatter to standardize indentation.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
@soburi soburi marked this pull request as ready for review February 26, 2026 21:14
Copilot AI review requested due to automatic review settings February 26, 2026 21:14
Copy link

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 primarily applies clang-format style changes across the Arduino Zephyr core to standardize indentation and brace placement, while also pulling in a couple of functional tweaks that go beyond formatting.

Changes:

  • Reformat Arduino core sources/headers (Serial, Print, common utilities, entrypoint) for consistent style.
  • Update the hello_arduino sample printk format specifiers to use %zu for size_t.
  • Modify delay() / delayMicroseconds() in zephyrCommon.cpp (adds always_inline attribute and changes microsecond delay behavior).

Reviewed changes

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

Show a summary per file
File Description
samples/hello_arduino/src/app.cpp Updates printk size_t format specifiers (%zu).
cores/arduino/zephyrSerial.h clang-format pass over Serial class declarations/macros.
cores/arduino/zephyrSerial.cpp clang-format pass; macro formatting and serialEventRun braces.
cores/arduino/zephyrPrint.h clang-format pass over inline Print methods and helpers.
cores/arduino/zephyrPrint.cpp clang-format pass over Print support implementation.
cores/arduino/zephyrCommon.cpp clang-format pass plus behavioral changes to delay functions.
cores/arduino/main.cpp clang-format pass; adds braces around serialEventRun call.
cores/arduino/apiCommon.cpp clang-format pass; whitespace/indent changes.
cores/arduino/Arduino.h clang-format pass over devicetree-related macros/enums.

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

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