cores: arduino: Format with clang-format#166
Open
soburi wants to merge 3 commits intozephyrproject-rtos:nextfrom
Open
cores: arduino: Format with clang-format#166soburi wants to merge 3 commits intozephyrproject-rtos:nextfrom
soburi wants to merge 3 commits intozephyrproject-rtos:nextfrom
Conversation
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>
There was a problem hiding this comment.
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_arduinosampleprintkformat specifiers to use%zuforsize_t. - Modify
delay()/delayMicroseconds()inzephyrCommon.cpp(addsalways_inlineattribute 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use a formatter to standardize indentation.
Committing to reduce the diff in preparation for the merge.
Please approve #163 and #165 first.