Kévin Redon | 9a12d68 | 2018-07-08 13:21:16 +0200 | [diff] [blame] | 1 | /* 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 Welte | abba8a8 | 2017-03-06 16:58:00 +0100 | [diff] [blame] | 15 | #pragma once |
Christina Quast | 53b2105 | 2014-12-09 15:34:35 +0100 | [diff] [blame] | 16 | |
Harald Welte | abba8a8 | 2017-03-06 16:58:00 +0100 | [diff] [blame] | 17 | enum led { |
| 18 | LED_RED, |
| 19 | LED_GREEN, |
| 20 | _NUM_LED |
| 21 | }; |
Christina Quast | 53b2105 | 2014-12-09 15:34:35 +0100 | [diff] [blame] | 22 | |
Harald Welte | abba8a8 | 2017-03-06 16:58:00 +0100 | [diff] [blame] | 23 | enum 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 Redon | 11914d9 | 2018-06-27 16:33:01 +0200 | [diff] [blame] | 30 | BLINK_2O_F = 6, |
| 31 | BLINK_200O_F = 7, |
| 32 | BLINK_600O_F = 8, |
| 33 | BLINK_CUSTOM = 9, |
Kévin Redon | d975411 | 2018-07-08 16:29:37 +0200 | [diff] [blame] | 34 | BLINK_2F_O, |
Harald Welte | abba8a8 | 2017-03-06 16:58:00 +0100 | [diff] [blame] | 35 | _NUM_LED_BLINK |
| 36 | }; |
Christina Quast | 53b2105 | 2014-12-09 15:34:35 +0100 | [diff] [blame] | 37 | |
Harald Welte | abba8a8 | 2017-03-06 16:58:00 +0100 | [diff] [blame] | 38 | void led_init(void); |
| 39 | void led_fini(void); |
| 40 | void led_stop(void); |
| 41 | void led_start(void); |
Christina Quast | 53b2105 | 2014-12-09 15:34:35 +0100 | [diff] [blame] | 42 | |
Harald Welte | abba8a8 | 2017-03-06 16:58:00 +0100 | [diff] [blame] | 43 | void led_blink(enum led led, enum led_pattern blink); |
| 44 | enum led_pattern led_get(enum led led); |