blob: 339702d4f6cd43cd9a455608b496c36d91276be7 [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,
Kévin Redond9754112018-07-08 16:29:37 +020034 BLINK_2F_O,
Harald Welteabba8a82017-03-06 16:58:00 +010035 _NUM_LED_BLINK
36};
Christina Quast53b21052014-12-09 15:34:35 +010037
Harald Welteabba8a82017-03-06 16:58:00 +010038void led_init(void);
39void led_fini(void);
40void led_stop(void);
41void led_start(void);
Christina Quast53b21052014-12-09 15:34:35 +010042
Harald Welteabba8a82017-03-06 16:58:00 +010043void led_blink(enum led led, enum led_pattern blink);
44enum led_pattern led_get(enum led led);