Skip to content

Commit 347a80d

Browse files
Ayush1325DhruvaG2000
authored andcommitted
Add ARDUINO_ENTRY config variable
- Controls if arduino entry functions (setup and loop) wrapper is provided - Useful for porting programs since while it might need Arduino APIs, but don't really need setup and loop structure. - Also useful for slowly migrating to Zephyr APIs Signed-off-by: Ayush Singh <[email protected]>
1 parent 814bf66 commit 347a80d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Kconfig

+4
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,8 @@ config ARDUINO_API_SERIAL_BUFFER_SIZE
2626
int "Buffer size for Arduino Serial API"
2727
default 64
2828

29+
config ARDUINO_ENTRY
30+
bool "Provide arduino setup and loop entry points"
31+
default y
32+
2933
endif

cores/arduino/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ if(NOT DEFINED ARDUINO_BUILD_PATH)
77
zephyr_sources(zephyrPrint.cpp)
88
zephyr_sources(zephyrSerial.cpp)
99
zephyr_sources(zephyrCommon.cpp)
10+
11+
if(DEFINED CONFIG_ARDUINO_ENTRY)
1012
zephyr_sources(main.cpp)
13+
endif()
1114

1215
endif()
1316

0 commit comments

Comments
 (0)