1 /*
2  * Copyright (c) 2006-2021, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2009-12-27     rdghx        mini2440
9  */
10 
11 /**
12  * @addtogroup mini2440
13  */
14 /*@{*/
15 
16 #include <s3c24x0.h>
17 #include "led.h"
18 
rt_hw_led_init(void)19 void rt_hw_led_init(void)
20 {
21     /* GPB5,GPB6,GPB7,GPB8 for LED */
22     GPBCON = GPBCON & (~(0xff << 10)) | (0x55 << 10);
23     GPBUP  |= (0x0f << 5);
24 }
25 
rt_hw_led_on(unsigned char value)26 void rt_hw_led_on(unsigned char value)
27 {
28     GPBDAT &= ~ ((value & 0x0f) << 5);
29 }
30 
rt_hw_led_off(unsigned char value)31 void rt_hw_led_off(unsigned char value)
32 {
33     GPBDAT |= (value & 0x0f) << 5;
34 }
35 
36 /*@}*/
37 
38