Skip to content

Commit

Permalink
utils: add support to nrf54l15 to state notifier
Browse files Browse the repository at this point in the history
KRKNWK-18680
[KRKNWK-18680]
Configuration tested on PCA10156 v0.2.1 (ES-5)

Signed-off-by: Krzysztof Taborowski <[email protected]>
  • Loading branch information
ktaborowski committed Mar 28, 2024
1 parent 033484c commit ea01047
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 7 additions & 7 deletions utils/include/application_states.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
X(receiving, gpio1, 3)
#elif defined(NRF54L15_ENGA_XXAA)
#define X_APPLICAITON_STATES \
X(error, gpio1, 8) \
X(working, gpio1, 8) \
X(registered, gpio1, 8) \
X(error, gpio1, 4) \
X(working, gpio1, 14) \
X(registered, gpio1, 13) \
X(time_sync, gpio1, 8) \
X(connected, gpio1, 8) \
X(dfu, gpio1, 8) \
X(sending, gpio1, 8) \
X(receiving, gpio1, 8)
X(connected, gpio0, 4) \
X(dfu, gpio1, 5) \
X(sending, gpio1, 6) \
X(receiving, gpio1, 7)
#else
#error "Unknow device application states."
#endif
Expand Down
4 changes: 4 additions & 0 deletions utils/src/state_notifier_gpio_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ static void gpio_enumerate_state(enum application_state state_id, uint32_t value
{
struct gpio_pin gpio_id = state_to_pin_mapper(state_id);

#if defined(NRF54L15_ENGA_XXAA)
gpio_pin_set_raw(gpio_id.port, gpio_id.pin, value);
#else
/* output activated with low state */
gpio_pin_set_raw(gpio_id.port, gpio_id.pin, !value);
#endif
}

static void state_change_handler_gpio(const struct notifier_state *state)
Expand Down

0 comments on commit ea01047

Please sign in to comment.