nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
led.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef _LED_H_
8#define _LED_H_
9
10#include <stdint.h>
11
12#define LED_APP_RGB 0
13#define LED_NET_RGB 1
14#define LED_APP_1_BLUE 2
15#define LED_APP_2_GREEN 3
16#define LED_APP_3_GREEN 4
17
18#define RED 0
19#define GREEN 1
20#define BLUE 2
21
22#define GRN GREEN
23#define BLU BLUE
24
26 LED_COLOR_OFF, /* 000 */
27 LED_COLOR_RED, /* 001 */
28 LED_COLOR_GREEN, /* 010 */
30 LED_COLOR_BLUE, /* 100 */
32 LED_COLOR_CYAN, /* 110 */
33 LED_COLOR_WHITE, /* 111 */
35};
36
37#define LED_ON LED_COLOR_WHITE
38
39#define LED_BLINK true
40#define LED_SOLID false
41
57int led_blink(uint8_t led_unit, ...);
58
74int led_on(uint8_t led_unit, ...);
75
88int led_off(uint8_t led_unit);
89
100int led_init(void);
101
102#endif /* _LED_H_ */
int led_blink(uint8_t led_unit,...)
Set the state of a given LED unit to blink.
int led_init(void)
Initialise the LED module.
int led_on(uint8_t led_unit,...)
Turn the given LED unit on.
@ LED_COLOR_MAGENTA
Definition: led.h:31
@ LED_COLOR_CYAN
Definition: led.h:32
@ LED_COLOR_RED
Definition: led.h:27
@ LED_COLOR_BLUE
Definition: led.h:30
@ LED_COLOR_GREEN
Definition: led.h:28
@ LED_COLOR_NUM
Definition: led.h:34
@ LED_COLOR_YELLOW
Definition: led.h:29
@ LED_COLOR_WHITE
Definition: led.h:33
@ LED_COLOR_OFF
Definition: led.h:26
int led_off(uint8_t led_unit)
Set the state of a given LED unit to off.
Color of LED.
Definition: led_effect.h:27