manipulationled.c
来自「利用freescale公司的MC9S08QE128开发的一套游戏机程序」· C语言 代码 · 共 77 行
C
77 行
#include "ManipulationLED.h"
#include "derivative.h" // include peripheral declarations
extern byte i_ComDisplay[4];
extern unsigned int i_DisplayPeriod[4];
const static byte ArrayLED[200]={0x3f, 0x06, 0x5b, 0x4f, 0x66,
0x6d, 0x7d, 0x07, 0x7f, 0x6f,
0x07, 0x38, 0x40, 0x0,
0x01,0x40,0x08,0x00,
0x01,0x40,0x08,0x00,
0x01,0x40,0x08,0x00,
0x01,0x40,0x08,0x00,
0x01,0x40,0x08,0x00,
0x01,0x40,0x08,0x00,
0x01,0x40,0x08,0x00,
0x01,0x40,0x08,0x00,
0x01,0x41,0x48,0x08,0x00,
0x01,0x41,0x48,0x08,0x00,
0x01,0x41,0x48,0x08,0x00,
0x01,0x41,0x48,0x08,0x00,
0x01,0x41,0x49,0x48,0x08,0x00,
0x01,0x41,0x49,0x48,0x08,0x00,
0x08,0x40,0x01,0x00,
0x08,0x40,0x01,0x00,
0x08,0x40,0x01,0x00,
0x08,0x40,0x01,0x00,
0x08,0x40,0x01,0x00,
0x08,0x40,0x01,0x00,
0x08,0x40,0x01,0x00,
0x08,0x40,0x01,0x00,
0x08,0x48,0x41,0x01,0x00,
0x08,0x48,0x41,0x01,0x00,
0x08,0x48,0x41,0x01,0x00,
0x08,0x48,0x41,0x01,0x00,
0x08,0x48,0x49,0x41,0x01,0x00,
0x08,0x48,0x49,0x41,0x01,0x00,
};
const static byte ArrayCom[4]={0x08, 0x04, 0x02, 0x01};
void CycleTurnOnLEDs(void)
{
}
void TurnOnLEDs(byte nCom, byte num)
{
byte temp0,temp1;
// turn off COM 2008-02-18
PTHD_PTHD3 = 0;
PTHD_PTHD2 = 0;
PTHD_PTHD1 = 0;
PTHD_PTHD0 = 0;
temp0 = ArrayLED[num];
temp1 = ArrayCom[nCom];
PTHD = ( (PTHD & 0xF0) | temp1 );
}
void Update_LEDs_Data(byte nCom, byte num, unsigned int period)
{
i_ComDisplay[nCom] = num;
i_DisplayPeriod[nCom] = period;
}
void Update_Display_Period(byte nCom, unsigned int period)
{
i_DisplayPeriod[nCom] = period;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?