30 lines
879 B
C
30 lines
879 B
C
// This project is used for demonstrating digital tubes of BSP library.
|
|
#include "Beep.h"
|
|
#include "STC15F2K60S2.H"
|
|
#include "displayer.h"
|
|
#include "key.H"
|
|
#include "music.h"
|
|
#include "sys.H"
|
|
|
|
code unsigned long SysClock = 11059200; //必须。定义系统工作时钟频率(Hz),用户必须修改成与实际工作频率(下载时选择的)一致
|
|
#ifdef _displayer_H_ //显示模块选用时必须。(数码管显示译码表,用戶可修改、增加等)
|
|
// customized decode table to display 12HL-21
|
|
code char decode_table[] = {0x00, 0x06, 0x5b, 0x76, 0x38, 0x40, 0x5b, 0x06};
|
|
#endif
|
|
|
|
void main()
|
|
{
|
|
DisplayerInit();
|
|
KeyInit();
|
|
MusicPlayerInit();
|
|
SetDisplayerArea(0, 7);
|
|
LedPrint(0);
|
|
MySTC_Init();
|
|
// different bits in decode table
|
|
Seg7Print(0, 1, 2, 3, 4, 5, 6, 7);
|
|
while (1)
|
|
{
|
|
MySTC_OS();
|
|
}
|
|
}
|