📄 led.c
字号:
/**************************************************************************************************
EDL RTOS Kernel
(c) Copyright 2005, Wu Jun
All Rights Reserved
For further information, please visit http://www.enjoydigitallife.com
* Description: None
* History:
Date Remarks
2005-01-06 Created initial version
2005-12-12 Finished the version 2.01
**************************************************************************************************/
#include "datatype.h"
#include "44b.h"
#include "led.h"
/**************************************************************************************************
* Description: Initialize
**************************************************************************************************/
void led_init(void)
{
/* Do nothing here */
}
/**************************************************************************************************
* Description: show the 8-bit data in LED indicator.
* Parametters: c the 8-bit data to be displayed in led indicator. e.g. if c = 0x01, then
the LED indicator will be lit as 00000001.
**************************************************************************************************/
void led_dispChar(U8 c)
{
if((c & 0x01)==0x01) //D3
rPDATC = rPDATC | (1<<1) ;
else
rPDATC = rPDATC & (~(1<<1)) ;
if(( c & 0x02)==0x02) //D4
rPDATC = rPDATC | (1<<2) ;
else
rPDATC = rPDATC & (~(1<<2)) ;
if(( c & 0x04)==0x04) //D5
rPDATC = rPDATC | (1<<3) ;
else
rPDATC = rPDATC & (~(1<<3)) ;
if(( c & 0x08)==0x08) //D6
rPDATE = rPDATE | (1<<5) ;
else
rPDATE = rPDATE & (~(1<<5)) ;
}
/**************************************************************************************************
* Description: delay
* Parametters: times specifies the cycle number
**************************************************************************************************/
void led_delay(U32 times)
{
U32 i;
for(i = 0; i < times; i++)
{
/* we do nothing here, just loop */
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -