doc: add documentation on default configurations
This commit is contained in:
parent
010ba56174
commit
79fe7274ca
@ -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
|
@ref config "identified compile-time configurations". To learn how to use
|
||||||
Kconfig in RIOT, please refer to the @ref kconfig-users-guide.
|
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}
|
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.
|
[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.
|
||||||
|
|||||||
@ -105,6 +105,29 @@ endif
|
|||||||
the dependency block for your board *before* its dependencies pull in their own
|
the dependency block for your board *before* its dependencies pull in their own
|
||||||
dependencies.
|
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}
|
### Makefile.features {#makefile-features}
|
||||||
|
|
||||||
This file defines all the features provided by the BOARD. These features
|
This file defines all the features provided by the BOARD. These features
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user