CAF: Shell module
The shell module of the Common Application Framework (CAF) allows interactions with CAF modules and events using a predefined set of Zephyr’s Shell commands.
The module introduces a shell command for submitting events informing about button press or release (button_event
).
Submitting button_event
related to the hardware button presses can be handled by the CAF: Buttons module.
Configuration
To use the module, enable the following Kconfig options:
CONFIG_CAF_SHELL
- This option is mandatory as it enables this module.CONFIG_SHELL
- This option enables Zephyr shell that is used by the module to receive commands from user.CONFIG_CAF
- This option enables the Common Application Framework.
This module selects the Kconfig option CONFIG_CAF_BUTTON_EVENTS
.
Usage
All shell commands of this module are subcommands of the caf_events command.
To send a button_event
, use the following syntax:
caf_events button_event [button_id] [pressed]
The button_event subcommand has two required arguments:
button_id
- A decimal number represents the ID of a button.pressed
- Button press state, can only be eithery
orn
.