blob: 1ade823d02c7255fc0707acf6488979cfc18ed4d [file] [log] [blame]
Kévin Redon9a12d682018-07-08 13:21:16 +02001/* This program is free software; you can redistribute it and/or modify
2 * it under the terms of the GNU General Public License as published by
3 * the Free Software Foundation; either version 2 of the License, or
4 * (at your option) any later version.
5 *
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 * GNU General Public License for more details.
10 *
11 * You should have received a copy of the GNU General Public License
12 * along with this program; if not, write to the Free Software
13 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
14 */
Harald Welteabba8a82017-03-06 16:58:00 +010015#pragma once
Christina Quast53b21052014-12-09 15:34:35 +010016
Harald Welteabba8a82017-03-06 16:58:00 +010017enum led {
18 LED_RED,
19 LED_GREEN,
20 _NUM_LED
21};
Christina Quast53b21052014-12-09 15:34:35 +010022
Harald Welteabba8a82017-03-06 16:58:00 +010023enum led_pattern {
24 BLINK_ALWAYS_OFF = 0,
25 BLINK_ALWAYS_ON = 1,
26 BLINK_3O_5F = 2,
27 BLINK_3O_30F = 3,
28 BLINK_3O_1F_3O_30F = 4,
29 BLINK_3O_1F_3O_1F_3O_30F= 5,
Kévin Redon11914d92018-06-27 16:33:01 +020030 BLINK_2O_F = 6,
31 BLINK_200O_F = 7,
32 BLINK_600O_F = 8,
33 BLINK_CUSTOM = 9,
Eric Wild1ad205e2021-07-26 23:54:51 +020034 BLINK_2F_O = 10,
35 BLINK_5O_5F = 11,
Harald Welteabba8a82017-03-06 16:58:00 +010036 _NUM_LED_BLINK
37};
Christina Quast53b21052014-12-09 15:34:35 +010038
Harald Welteabba8a82017-03-06 16:58:00 +010039void led_init(void);
40void led_fini(void);
41void led_stop(void);
42void led_start(void);
Christina Quast53b21052014-12-09 15:34:35 +010043
Harald Welteabba8a82017-03-06 16:58:00 +010044void led_blink(enum led led, enum led_pattern blink);
45enum led_pattern led_get(enum led led);