📄 leds.c
字号:
/*
* file: leds.c
*
* PowerPC 8240 LED support for bank of 8 leds on Windriver sbc8240
* for UCOS-II
*
* Author: Ernie Price
* eprice@bitwise.net
*
*/
#include "includes.h"
static INT8U image; // shadow image of LED
static INT8U *LEDs = (INT8U*)0xffe80000; // physical address of LEDs
/*
\breif complements the specified LED bit - used by IRQ
*/
void IRQLedManipulate(INT8U hex)
{
image ^= hex;
*LEDs = image;
}
/*
\breif complements the specified LED bit - use by tasks
*/
void LedManipulate(INT8U hex)
{
MSR_SAVE;
OS_ENTER_CRITICAL();
image ^= hex;
*LEDs = image;
OS_EXIT_CRITICAL();
}
/* End of Source */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -