Skip to content

Commit

Permalink
modules: trigger: Add SMF support
Browse files Browse the repository at this point in the history
Add SMF support

Signed-off-by: Simen S. Røstad <[email protected]>
  • Loading branch information
simensrostad committed Jun 10, 2024
1 parent 1c5e06c commit 42ba19a
Show file tree
Hide file tree
Showing 4 changed files with 295 additions and 36 deletions.
2 changes: 2 additions & 0 deletions app/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ CONFIG_ZBUS=y
CONFIG_ZBUS_MSG_SUBSCRIBER=y
CONFIG_ZBUS_MSG_SUBSCRIBER_NET_BUF_POOL_SIZE=32
CONFIG_SMF=y
CONFIG_SMF_ANCESTOR_SUPPORT=y
CONFIG_SMF_INITIAL_TRANSITION=y

# Location
CONFIG_LOCATION=y
Expand Down
8 changes: 8 additions & 0 deletions app/src/common/message_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,11 @@ ZBUS_CHAN_DEFINE(CLOUD_CHAN,
ZBUS_OBSERVERS(fota, app, location, trigger),
CLOUD_DISCONNECTED
);

ZBUS_CHAN_DEFINE(BUTTON_CHAN,
uint8_t,
NULL,
NULL,
ZBUS_OBSERVERS(trigger),
ZBUS_MSG_INIT(0)
);
3 changes: 2 additions & 1 deletion app/src/common/message_channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ ZBUS_CHAN_DECLARE(
LED_CHAN,
CLOUD_CHAN,
FOTA_ONGOING_CHAN,
CONFIG_CHAN
CONFIG_CHAN,
BUTTON_CHAN
);

#ifdef __cplusplus
Expand Down
Loading

0 comments on commit 42ba19a

Please sign in to comment.