blob: 4155a6bab7f219fc24011b64f03620b6c9756b3b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
/*
* File : led.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006, RT-Thread Develop Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
*
* Change Logs:
* Date Author Notes
* 2009-12-27 rdghx mini2440
*/
/**
* @addtogroup mini2440
*/
/*@{*/
#include <s3c24x0.h>
#include "led.h"
void rt_hw_led_init(void)
{
/* GPB5,GPB6,GPB7,GPB8 for LED */
GPBCON = GPBCON & (~(0xff << 10)) | (0x55 << 10);
GPBUP |= (0x0f << 5);
}
void rt_hw_led_on(unsigned char value)
{
GPBDAT &= ~ ((value & 0x0f) << 5);
}
void rt_hw_led_off(unsigned char value)
{
GPBDAT |= (value & 0x0f) << 5;
}
/*@}*/
|