Skip to content

Commit

Permalink
Add ARDUINO_ENTRY config variable
Browse files Browse the repository at this point in the history
- 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 <ayushdevel1325@gmail.com>
  • Loading branch information
Ayush1325 committed May 25, 2024
1 parent 814bf66 commit 1823ac4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@ config ARDUINO_API_SERIAL_BUFFER_SIZE
int "Buffer size for Arduino Serial API"
default 64

config ARDUINO_ENTRY
bool "Provide arduino setup and loop entry points"
default y

endif
3 changes: 3 additions & 0 deletions cores/arduino/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ if(NOT DEFINED ARDUINO_BUILD_PATH)
zephyr_sources(zephyrPrint.cpp)
zephyr_sources(zephyrSerial.cpp)
zephyr_sources(zephyrCommon.cpp)

if(DEFINED CONFIG_ARDUINO_ENTRY)
zephyr_sources(main.cpp)
endif()

endif()

0 comments on commit 1823ac4

Please sign in to comment.