32 volatile unsigned char gear;
38 #define COVER_BUF 0x32000000
39 #define BACKGROUND_BUF 0x31000000
46 #define TRACK_RADIUS 100
47 #define TRACK_CENTRE_X 200.0f
48 #define TRACK_CENTRE_Y 120.0f
49 #define TRACK_WIDTH_HALF 17.0f
50 #define TRACK_COLOR 0x000000
52 #define VEHICLE_WIDTH_HALF 11
53 #define VEHICLE_COLOR 0xffff00
void VehicleDisplays(void)
显示赛车状态
Definition: vehicle.c:106
unsigned char speed
Definition: vehicle.h:30
void delay(int time)
简单的延时函数
Definition: vehicle.c:303
void DisplayOneSMG(int p, int num, int dot)
数码管显示函数
Definition: vehicle.c:154
float position
Definition: vehicle.h:29
volatile unsigned char gear
Definition: vehicle.h:32
void VehicleInit(void)
赛车程序初始化函数
Definition: vehicle.c:27
void VehicleStatusUpdate(void)
更新赛车数据
Definition: vehicle.c:45
void DrawRect(void)
绘制蓝色矩形方块
Definition: vehicle.c:254
void DrawTrack(void)
绘制圆形赛道
Definition: vehicle.c:204
void DisplaySMG(void)
数码管显示函数 在左边两位显示当前已走圈数
Definition: vehicle.c:126
unsigned char laps
Definition: vehicle.h:31
void DrawVehicle(float p, COLOR c)
绘制赛车,即一个小矩形
Definition: vehicle.c:234
void __irq INT0_Handler(void)
按键1中断处理函数 每按一次“档位”成员变量自减一
Definition: vehicle.c:288
void __irq INT2_Handler(void)
按键2中断处理函数 每按一次“档位”成员变量自增一
Definition: vehicle.c:274
void DisplayLED(int flag)
LED 显示函数
Definition: vehicle.c:185