diff options
Diffstat (limited to 'firmware/led.h')
-rw-r--r-- | firmware/led.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/firmware/led.h b/firmware/led.h new file mode 100644 index 0000000000..0c43a70e74 --- /dev/null +++ b/firmware/led.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 by Alan Korr | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #ifndef __LED_H__ | ||
21 | #define __LED_H__ | ||
22 | |||
23 | #include <sh7034.h> | ||
24 | #include <system.h> | ||
25 | |||
26 | #define LEDB 6 /* PB6 : red LED */ | ||
27 | |||
28 | static inline void led_turn_off (void) | ||
29 | { | ||
30 | clear_bit (LEDB,PBDR+1); | ||
31 | clear_bit (2,ITUTSTR); | ||
32 | } | ||
33 | |||
34 | static inline void led_turn_on (void) | ||
35 | { | ||
36 | set_bit (LEDB,PBDR+1); | ||
37 | set_bit (2,ITUTSTR); | ||
38 | } | ||
39 | |||
40 | static inline void led_toggle (void) | ||
41 | { | ||
42 | toggle_bit (LEDB,PBDR+1); | ||
43 | } | ||
44 | |||
45 | extern void led_set_volume (unsigned short volume); | ||
46 | extern void led_setup (void); | ||
47 | |||
48 | #endif | ||
49 | |||
50 | |||