Skip to content

Commit 60d57c3

Browse files
DhruvaG2000soburi
authored andcommitted
docs: variants: make variant.h optional
Now there's no requirement to have variant.h in every new variant's folder Signed-off-by: Dhruva Gole <d-gole@ti.com>
1 parent 2044d49 commit 60d57c3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

documentation/variants.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ target board. To add board support:
2727
needs to be added it needs to be done in the `variants/` folder.
2828
Add a folder inside of the variants folder that matches the name of your board.
2929
2. Add an overlay file file that match the name of the board.
30-
3. Add a `variant.h` file.
30+
3. Add a `variant.h` file. (if required only)
3131

3232
An example of this structure is shown below.
3333

3434
```tree
3535
variants/
3636
├── arduino_nano_33_ble
3737
│   ├── arduino_nano_33_ble.overlay
38-
│   ├── variant.h
38+
│   ├── variant.h (optional)
3939
```
4040

4141
It is possible to apply the overlay outside of the `variants` folder. In that case `cmake` will show a warning and a default empty `variant.h` file will be used. The `zephyr,user` section will still need to be defined somewhere in your project, as described in the [Guide to Writing Overlays section](#guide-to-writing-overlays).
@@ -187,7 +187,7 @@ One example of a change that you may find useful is mapping additional pins. For
187187
example, the LEDs on the nRF52840 are not connected to any of the Arduino header
188188
pins. To define a built-in LED for this board, a 22nd pin definition was added.
189189

190-
Your pinmap header file must be added to the variant.h file by adding three
190+
Your pinmap header file can optionally be added to the variant.h file by adding three
191191
lines using this format:
192192

193193
```c

0 commit comments

Comments
 (0)