資源簡介
#include "led.h"
#include "delay.h"
#include "sys.h"
#include "lcd.h"
#include "usart.h"
#include "rtc.h"
int main(void)
{
u8 t=0;
delay_init(); //延時函數初始化
NVIC_Configuration(); //設置 NVIC 中斷分組 2:2
位搶占優先級,2 位響應優先級
uart_init(9600); //串口初始化為 9600
LED_Init(); //LED 端口初始化
LCD_Init();
BEEP_Init(); //初始化蜂鳴器端口
RTC_Init(); //RTC 初始化
POINT_COLOR=GREEN; //設置字體為紅色
LCD_ShowString(70,50,200,16,16,"^_^ andy ^_^");
POINT_COLOR=BLUE; //設置字體為藍色
LCD_ShowString(60,130,200,16,16," - - ");
LCD_ShowString(60,162,200,16,16," : : ");
while(1)
{
代碼片段和文件信息
評論
共有 條評論