nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
led_state_def.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#include "led_state.h"
8#include <caf/led_effect.h>
9
10/* This configuration file is included only once from led_state module and holds
11 * information about LED effect associated with each state.
12 */
13
14/* This structure enforces the header file is included only once in the build.
15 * Violating this requirement triggers a multiple definition error at link time.
16 */
18
19
20/* Map function to LED ID */
21static const uint8_t led_map[LED_ID_COUNT] = {
24};
25
26/* On the nRF54L05 SoC, you can only use the **GPIO1** port for PWM hardware peripheral output.
27 * Because of that, on the DK PCA10156 revision v0.9.3 **LED 0** and **LED 2** cannot be used
28 * for PWM output.
29 *
30 * You can still use these LEDs with the PWM LED driver, but you must set the LED color to
31 * `LED_COLOR(255, 255, 255)` or `LED_COLOR(0, 0, 0)`. You must also disable the
32 * `CONFIG_PWM_NRFX_NO_GLITCH_DUTY_100` Kconfig option. This ensures the PWM peripheral is not used
33 * for the mentioned LEDs.
34 */
35
41
#define LED_COLOR(_r, _g, _b)
Definition led_effect.h:96
#define LED_EFFECT_LED_BREATH(_period, _color)
Definition led_effect.h:224
#define LED_EFFECT_LED_BLINK(_period, _color)
Definition led_effect.h:207
#define LED_EFFECT_LED_OFF()
Definition led_effect.h:132
#define LED_EFFECT_LED_ON(_color)
Definition led_effect.h:116
@ LED_PEER_STATE_CONNECTED
Definition led_state.h:45
@ LED_PEER_STATE_CONFIRM_ERASE
Definition led_state.h:51
@ LED_PEER_STATE_ERASE_ADV
Definition led_state.h:53
@ LED_PEER_STATE_DISCONNECTED
Definition led_state.h:43
@ LED_PEER_STATE_CONFIRM_SELECT
Definition led_state.h:49
@ LED_PEER_STATE_PEER_SEARCH
Definition led_state.h:47
@ LED_PEER_STATE_COUNT
Definition led_state.h:56
@ LED_SYSTEM_STATE_CHARGING
Definition led_state.h:32
@ LED_SYSTEM_STATE_IDLE
Definition led_state.h:30
@ LED_SYSTEM_STATE_COUNT
Definition led_state.h:37
@ LED_SYSTEM_STATE_ERROR
Definition led_state.h:34
@ LED_ID_COUNT
Definition led_state.h:67
@ LED_ID_SYSTEM_STATE
Definition led_state.h:62
@ LED_ID_PEER_STATE
Definition led_state.h:64
#define LED_PEER_COUNT
Definition led_state.h:80
Header file with LED states.
const struct @15 led_state_def_include_once
static const uint8_t led_map[LED_ID_COUNT]
Definition led_state_def.h:21
static const struct led_effect led_system_state_effect[LED_SYSTEM_STATE_COUNT]
Definition led_state_def.h:26
static const struct led_effect led_peer_state_effect[LED_PEER_COUNT][LED_PEER_STATE_COUNT]
Definition led_state_def.h:32
Single LED effect.
Definition led_effect.h:51