-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CXRD-19] Added LED/Buzzer feedback on button actions
- play led pattern on button click - play croxel morse on button click_n_hold Signed-off-by: Anuj Pathak <[email protected]>
- Loading branch information
1 parent
b8ddf29
commit dc50309
Showing
5 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,5 @@ target_sources(app PRIVATE | |
src/main.c | ||
src/buzzer.c | ||
src/ledui.c | ||
src/user_button.c | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
CONFIG_LOG=y | ||
CONFIG_PWM=y | ||
CONFIG_USER_ALERTS=y | ||
CONFIG_USER_BUTTON_ACTIONS=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <zephyr/kernel.h> | ||
#include <zephyr/logging/log.h> | ||
#include <user_button_actions/user_button_actions.h> | ||
|
||
LOG_MODULE_REGISTER(user_button); | ||
|
||
static struct user_button_actions_channel btn = { | ||
.btn = GPIO_DT_SPEC_GET(DT_ALIAS(sw0), gpios), | ||
}; | ||
|
||
int user_button_setup(void) | ||
{ | ||
user_button_actions_start_monitor(&btn); | ||
return 0; | ||
} | ||
|
||
SYS_INIT(user_button_setup, APPLICATION, 99); |