Skip to content

cores: arduino: Split zephyrCommon.cpp#188

Draft
soburi wants to merge 4 commits into
zephyrproject-rtos:nextfrom
soburi:split_zephyrCommon
Draft

cores: arduino: Split zephyrCommon.cpp#188
soburi wants to merge 4 commits into
zephyrproject-rtos:nextfrom
soburi:split_zephyrCommon

Conversation

@soburi
Copy link
Copy Markdown
Member

@soburi soburi commented May 6, 2026

Split zephyrCommon.cpp into small cpp files.

@soburi soburi force-pushed the split_zephyrCommon branch 3 times, most recently from 52f4b79 to ab5ff58 Compare May 31, 2026 10:21
@soburi soburi changed the title Split zephyr common cores: arduino: Split zephyrCommon.cpp May 31, 2026
@soburi soburi force-pushed the split_zephyrCommon branch from ab5ff58 to 052aed4 Compare May 31, 2026 12:56
Allow Arduino APIs to switch a pin between GPIO and peripheral
functions by re-running the selected device init path when
the requested owner changes.

This is an interim pinmux handoff mechanism for boards where
sketches may move a pin back and forth between
serial/GPIO/PWM-style use.

Co-Authored-by: Martino Facchin <m.facchin@arduino.cc>
Co-Authored-by: pennam <m.pennasilico@arduino.cc>
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
@soburi soburi force-pushed the split_zephyrCommon branch from 052aed4 to 649366a Compare June 1, 2026 05:19
soburi added 3 commits June 1, 2026 14:20
Replace {0} with {} for port_callback, set dac_channel_cfg::internal
explicitly, and expand the adc_sequence initialization to make default
values explicit and avoid C++ initializer warnings.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Move constexpr-specified constants and functions used for compile-time
calculations from zephyrCommon.cpp to wiring_private.h.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Split zephyrCommon.cpp into smaller source files.

wiring_digital.cpp:
  - pinMode
  - digitalWrite
  - digitalRead

wiring_analog.cpp:
  - analogRead
  - analogWrite
  - analogReference
  - analogReadResolution
  - analogWriteResolution

wiring_pulse.cpp:
  - pulseIn

WInterrupts.cpp:
  - attachInterrupt
  - detachInterrupt
  - interrupts
  - noInterrupts
  - digitalPinToInterrupt

WMath.cpp:
  - randomSeed
  - random

Tone.cpp:
  - tone
  - noTone

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
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.

2 participants