diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index 67226d57..673968ef 100644 --- a/cores/arduino/Arduino.h +++ b/cores/arduino/Arduino.h @@ -97,7 +97,7 @@ enum analogPins { DT_FOREACH_PROP_ELEM(DT_PATH(zephyr_user), #endif -#include +#include #ifdef __cplusplus #include #include diff --git a/documentation/variants.md b/documentation/variants.md index 5f26571e..0ea44c7a 100644 --- a/documentation/variants.md +++ b/documentation/variants.md @@ -27,7 +27,7 @@ target board. To add board support: needs to be added it needs to be done in the `variants/` folder. Add a folder inside of the variants folder that matches the name of your board. 2. Add an overlay file and a pinmap header file that match the name of the board. -3. Add your new headerfile to an `#ifdef` statement in the variants.h file. +3. Add your new headerfile to an `#ifdef` statement in the variant.h file. An example of this structure is shown below. @@ -37,13 +37,13 @@ variants/ │   ├── arduino_nano_33_ble.overlay │   └── arduino_nano_33_ble_pinmap.h ├── CMakeLists.txt -└── variants.h +└── variant.h ``` -- The top level consists of `CMakeLists.txt`, `variants.h` and the `` folder. Each of these files have a specific role to play. +- The top level consists of `CMakeLists.txt`, `variant.h` and the `` folder. Each of these files have a specific role to play. - The `Cmakelists` help the compiler locate the proper directory to help find the proper header files that are board specific. You need to add the name using `zephyr_include_directories(BOARD_NAME)` to this file. Do note that this `BOARD_NAME` is the same as the name of your board's directory. - - `variants.h` contains the necessary `#includes` inorder to tell the source code about your board's pinmap. + - `variant.h` contains the necessary `#includes` inorder to tell the source code about your board's pinmap. - The `` folder is where the overlay and pinmap file resides. Inorder to understand how to write DT overlays, lookup `Documentation/overlays.md`. To understand the `` file, go through the existing `variants/ARDUINO_NANO33BLE/arduino_nano_ble_sense_pinmap.h` which shows how to use the overlay nodes inside our C programs using zephyr macros like `GPIO_DT_SPEC_GET`. The zephyr-project documentation on this is pretty extensive as well and worth reading. ## Guide to Writing Overlays @@ -193,7 +193,7 @@ One example of a change that you may find useful is mapping additional pins. For example, the LEDs on the nRF52840 are not connected to any of the Arduino header pins. To define a built-in LED for this board, a 22nd pin definition was added. -Your pinmap header file must be added to the variants.h file by adding three +Your pinmap header file must be added to the variant.h file by adding three lines using this format: ```c diff --git a/variants/arduino_mkrzero/variants.h b/variants/arduino_mkrzero/variant.h similarity index 100% rename from variants/arduino_mkrzero/variants.h rename to variants/arduino_mkrzero/variant.h diff --git a/variants/arduino_nano_33_ble/variants.h b/variants/arduino_nano_33_ble/variant.h similarity index 100% rename from variants/arduino_nano_33_ble/variants.h rename to variants/arduino_nano_33_ble/variant.h diff --git a/variants/arduino_nano_33_ble_sense/variants.h b/variants/arduino_nano_33_ble_sense/variant.h similarity index 100% rename from variants/arduino_nano_33_ble_sense/variants.h rename to variants/arduino_nano_33_ble_sense/variant.h diff --git a/variants/arduino_nano_33_iot/variants.h b/variants/arduino_nano_33_iot/variant.h similarity index 100% rename from variants/arduino_nano_33_iot/variants.h rename to variants/arduino_nano_33_iot/variant.h diff --git a/variants/beagleconnect_freedom/variants.h b/variants/beagleconnect_freedom/variant.h similarity index 100% rename from variants/beagleconnect_freedom/variants.h rename to variants/beagleconnect_freedom/variant.h diff --git a/variants/cc3220sf_launchxl/variants.h b/variants/cc3220sf_launchxl/variant.h similarity index 100% rename from variants/cc3220sf_launchxl/variants.h rename to variants/cc3220sf_launchxl/variant.h diff --git a/variants/nrf52840dk_nrf52840/variants.h b/variants/nrf52840dk_nrf52840/variant.h similarity index 100% rename from variants/nrf52840dk_nrf52840/variants.h rename to variants/nrf52840dk_nrf52840/variant.h diff --git a/variants/nrf9160dk_nrf9160/variants.h b/variants/nrf9160dk_nrf9160/variant.h similarity index 100% rename from variants/nrf9160dk_nrf9160/variants.h rename to variants/nrf9160dk_nrf9160/variant.h