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



Power manager module


Bluetooth LE advertising module


Buttons module

HID forward module

Motion module

Power manager module

Wheel module


Sink modules for module_state_event


See the Overview: Firmware architecture for more information about the event-based communication in the nRF Desktop application and about how to read this table.


The module uses Zephyr’s 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:

  • - GPIO device name (obtained from devicetree, for example with DT_LABEL(DT_NODELABEL(gpio0))).

  • - Pointer to the array of pin_state.

  • port_state.ps_count - Size of the ps array.

Every pin_state defines the state of a single GPIO pin:

  • - Pin number.

  • pin_state.val - Value set for the pin.