1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2009 by Bob Cousins
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
24 #include "led-mini2440.h"
26 /* LED functions for debug */
30 S3C2440_GPIO_CONFIG (GPBCON
, 5, GPIO_OUTPUT
);
31 S3C2440_GPIO_CONFIG (GPBCON
, 6, GPIO_OUTPUT
);
32 S3C2440_GPIO_CONFIG (GPBCON
, 7, GPIO_OUTPUT
);
33 S3C2440_GPIO_CONFIG (GPBCON
, 8, GPIO_OUTPUT
);
35 S3C2440_GPIO_PULLUP (GPBUP
, 5, GPIO_PULLUP_DISABLE
);
36 S3C2440_GPIO_PULLUP (GPBUP
, 6, GPIO_PULLUP_DISABLE
);
37 S3C2440_GPIO_PULLUP (GPBUP
, 7, GPIO_PULLUP_DISABLE
);
38 S3C2440_GPIO_PULLUP (GPBUP
, 8, GPIO_PULLUP_DISABLE
);
41 /* Turn on one or more LEDS */
42 void set_leds (int led_mask
)
47 /* Turn off one or more LEDS */
48 void clear_leds (int led_mask
)
53 /* Alternate flash pattern1 and pattern2 */
55 void led_flash (int led_pattern1
, int led_pattern2
)
59 set_leds (led_pattern1
);
61 clear_leds (led_pattern1
);
63 set_leds(led_pattern2
);
65 clear_leds (led_pattern2
);