This repository was archived by the owner on Apr 17, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +27
-5
lines changed
Expand file tree Collapse file tree 5 files changed +27
-5
lines changed Original file line number Diff line number Diff line change @@ -118,10 +118,10 @@ fabric.properties
118118
119119# ## VisualStudioCode ###
120120.vscode /*
121- .vscode /settings.json
122121! .vscode /tasks.json
123122! .vscode /launch.json
124123! .vscode /extensions.json
124+ ! .vscode /cmake-kits.json
125125
126126# ## VisualStudioCode Patch ###
127127# Ignore all local history of files
Original file line number Diff line number Diff line change @@ -29,10 +29,8 @@ endfunction()
2929#=============================================================================#
3030function (_add_platform_library _library_name _board_id)
3131
32- find_library_header_files("${ARDUINO_CMAKE_PLATFORM_LIBRARIES_PATH} /${_library_name} /src"
33- lib_headers)
34- find_library_source_files("${ARDUINO_CMAKE_PLATFORM_LIBRARIES_PATH} /${_library_name} /src"
35- lib_source_files)
32+ find_library_header_files("${ARDUINO_CMAKE_PLATFORM_LIBRARIES_PATH} /${_library_name} /src" lib_headers)
33+ find_library_source_files("${ARDUINO_CMAKE_PLATFORM_LIBRARIES_PATH} /${_library_name} /src" lib_source_files)
3634
3735 set (lib_sources ${lib_headers} ${lib_source_files} )
3836
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ project(Examples LANGUAGES C CXX ASM)
44
55add_subdirectory (hello-world)
66add_subdirectory (arduino-library)
7+ add_subdirectory (platform-library)
78add_subdirectory (3rd-party-library)
89add_subdirectory (header-only-library)
910add_subdirectory (blink-example)
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.8.2)
2+
3+ project (Platform_Library)
4+ get_board_id(board_id nano atmega328)
5+
6+ add_arduino_executable(Platform_Library ${board_id} platformLibrary.cpp)
7+
8+ link_platform_library(Platform_Library Wire ${board_id} )
9+ link_platform_library(Platform_Library SPI ${board_id} )
Original file line number Diff line number Diff line change 1+ #include < Arduino.h>
2+
3+ void setup ()
4+ {
5+ pinMode (LED_BUILTIN, OUTPUT);
6+ }
7+
8+ void loop ()
9+ {
10+ digitalWrite (LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
11+ delay (1000 ); // wait for a second
12+ digitalWrite (LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
13+ delay (1000 ); // wait for a second
14+ }
You can’t perform that action at this time.
0 commit comments