Board module

The board module is used to ensure the proper state of GPIO pins that are not configured by other modules in the application. Ensuring the proper state is done by setting the state of the mentioned pins on the system start and wakeup, and when the system enters the low-power mode.

Module events

Source Module

Input Event

This Module

Output Event

Sink Module

Source modules for module_state_event

module_state_event

board

Power manager module

power_down_event

Bluetooth LE advertising module

wake_up_event

Buttons module

HID forward module

Motion module

Power manager module

Wheel module

module_state_event

Sink modules for module_state_event

Note

See the Application overview for more information about the event-based communication in the nRF Desktop application and about how to read this table.

Configuration

The module uses Zephyr’s General-Purpose Input/Output (GPIO) driver to set the pin state. For this reason, set the CONFIG_GPIO option.

For every configuration, you must define the port_state_def.h file in the board-specific directory in the application configuration directory.

The port_state_def.h file defines the states set to the GPIO ports by the following arrays:

  • port_state_on - State set on the system start and wakeup.

  • port_state_off - State set when the system enters the low-power mode.

Every port_state refers to a single GPIO port and contains the following information:

Every pin_state defines the state of a single GPIO pin:

You can use the CONFIG_DESKTOP_BOARD_PM_EVENTS Kconfig option to enable or disable handling of the power management events, such as power_down_event and wake_up_event. The option is enabled by default and depends on the CONFIG_CAF_PM_EVENTS Kconfig option.