我弄成了这样 对吗 #include "system.h"#include "Sys
tick.h"
#include "led.h"
#include "smg.h"
#include "beep.h"
u8 smgduan[16]={0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07,
0x7F, 0x6F, 0x77, 0x7C, 0x39, 0x5E, 0x79, 0x71};//0~F ÊýÂë¹Ü¶ÎÑ¡Êý¾Ý
int main()
{
u8 i=0;
SysTick_Init(72);
LED_Init();
SMG_Init();
while(1)
{
for(i=0;i<16;i++)
{
GPIO_Write(SMG_PORT,(u16)(~smgduan
));
delay_ms(1000);
}
BEEP_Init();
u16 n=0;
while(1)
{
n++;
if(n%10==0)
{
beep=!beep;
}
if(n%20000==0)
{
led1=!led1;
}
delay_us(10);
}
}
}
-
-
一周热门 更多>