Skip to content

Commit

Permalink
doc: add documentation on default configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrolanzieri committed Mar 10, 2021
1 parent 010ba56 commit 79fe727
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/doxygen/src/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,18 @@ For instructions on how to configure via `CFLAGS` check the
@ref config "identified compile-time configurations". To learn how to use
Kconfig in RIOT, please refer to the @ref kconfig-users-guide.

Default configurations {#default-configurations}
----------------------
When devices have a common access interface, having a default configuration to
enable them across platforms, without having to explicitly specify which modules
to include, comes in handy. For this, two pseudomodules are defined:

- `saul_default`: will enable all the drivers of sensors and actuators that are
present in the target platform.

- `netdev_default`: will enable all the drivers of network devices
present in the target platform.

Use Docker to build RIOT {#docker}
========================
[Docker](https://www.docker.com/) is a platform that allows packaging software into containers that can easily be run on any Linux that has Docker installed.
Expand Down
23 changes: 23 additions & 0 deletions doc/doxygen/src/porting-boards.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,29 @@ endif
the dependency block for your board *before* its dependencies pull in their own
dependencies.

#### Default configurations
As explained in @ref default-configurations "Default Configurations", there are
two pseudomodules that are used to indicate that certain drivers of devices
present in the platform should be enabled. Each board (or CPU) has knowledge as
to which drivers should be enabled in each case.

The previous code snippet shows how a board which has a @ref drivers_sx127x
device, pulls in its driver when the default network interfaces are required.

When the pseudomodule `saul_default` is enabled, the board should pull in all
the drivers of the devices it has which provide a @ref drivers_saul interface. This is
usually done as following:

```mk
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
USEMODULE += apds9960
USEMODULE += bmp280_i2c
USEMODULE += lis3mdl
USEMODULE += sht3x
endif
```

### Makefile.features {#makefile-features}

This file defines all the features provided by the BOARD. These features
Expand Down

0 comments on commit 79fe727

Please sign in to comment.