📄 screen.lst
字号:
C51 COMPILER V7.06 SCREEN 10/13/2006 09:21:10 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE SCREEN
OBJECT MODULE PLACED IN screen.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE screen.c LARGE BROWSE DEBUG OBJECTEXTEND
stmt level source
1 #include <stdio.h>
2 #include <absacc.h>
3 #include <stdarg.h>
4 #include <./Atmel/at89x52.h>
5 #include "source.h"
6 /*为屏幕的下部分显示时间、信息的区域显示函数*/
7 bit screen_hbs(void){
8 1 static unsigned char inf_seq=0;
9 1 unsigned char local_msg;
10 1 local_msg=read_hbs_msg();//读其消息队列
11 1 if(local_msg){//如果返回值为非0,则消息不为空
12 2 switch(local_msg){
13 3 case MSG_HBS_INFO_CLEAR:
14 3 switch(screen.hbs_fsm){
15 4 case FSM_HBS_CLEAR:
16 4 break;
17 4 default:
18 4 clr_notice();
19 4 change_hbs_fsm(FSM_HBS_CLEAR);
20 4 break;
21 4 }
22 3 break;
23 3 case MSG_HBS_INFO_SHOW:
24 3 switch(screen.hbs_fsm){
25 4 case FSM_HBS_INFO:
26 4 break;
27 4 default:
28 4 clr_notice(); //清除以前的信息
29 4 inf_seq=0;
30 4 show_elvinfo(show_notice.ognd+inf_seq); //显示第一条信息
31 4 change_hbs_fsm(FSM_HBS_INFO);//把状态转换为显示信息状态
32 4 break;
33 4 }
34 3 break;
35 3 case MSG_HBS_INFO_CHANGE:
36 3 switch(screen.hbs_fsm){
37 4 case FSM_HBS_INFO://循环显示从1到9的信息
38 4 clr_notice();//清除以前的信息
39 4 inf_seq++;
40 4 inf_seq %=10;
41 4 show_elvinfo(show_notice.ognd+inf_seq);//显示下一条信息
42 4 break;
43 4 }
44 3 break;
45 3 case MSG_HBS_UPD_TIME://更新时间
46 3 break;
47 3 case MSG_HBS_UPD_TEMPE://更新温度
48 3 show_wd(others.temperature);
49 3 break;
50 3 default:
51 3 break;
52 3 }
53 2 return 1;
54 2 }
55 1 else{
C51 COMPILER V7.06 SCREEN 10/13/2006 09:21:10 PAGE 2
56 2 return 0;
57 2 }
58 1 }
59 /*为屏幕显示箭头的区域*/
60 bit screen_status(void){
61 1 static unsigned char move_step=(STATAREA_HEIGHT-ARROW_HEIGHT)/3-1;
62 1 unsigned char this_msg;
63 1 this_msg=read_status_msg();//读其消息队列
64 1 if(this_msg){
65 2 switch(this_msg){
66 3 case MSG_STATUS_UP://为显示箭头向上的消息
67 3 switch(screen.status_fsm){
68 4 case FSM_STATUS_UP:
69 4 break;
70 4 default:
71 4 clr_area(STATAREA_LEFT,STATAREA_TOP,STATAREA_WIDTH,STATAREA_HEIGHT);
72 4 draw_uparrow(POS_ARROW_ORGX,STATAREA_TOP+STATAREA_HEIGHT-ARROW_HEIGHT);
73 4 scentry.arrow_cur_top=STATAREA_TOP+STATAREA_HEIGHT-ARROW_HEIGHT;
74 4 change_status_fsm(FSM_STATUS_UP);
75 4 break;
76 4 }
77 3 break;
78 3 case MSG_STATUS_DOWN://为显示箭头向下的消息
79 3 switch(screen.status_fsm){
80 4 case FSM_STATUS_DOWN:
81 4 break;
82 4 default:
83 4 clr_area(STATAREA_LEFT,STATAREA_TOP,STATAREA_WIDTH,STATAREA_HEIGHT);
84 4 draw_downarrow(POS_ARROW_ORGX,STATAREA_TOP);
85 4 scentry.arrow_cur_top=STATAREA_TOP;
86 4 change_status_fsm(MSG_STATUS_DOWN);
87 4 break;
88 4
89 4 }
90 3 break;
91 3 case MSG_STATUS_CLEAR://为清除箭头的消息
92 3 switch(screen.status_fsm){
93 4 case FSM_STATUS_CLR:
94 4 break;
95 4 default:
96 4 /*清除显示箭头的区域*/
97 4 clr_area(STATAREA_LEFT,STATAREA_TOP,STATAREA_WIDTH,STATAREA_HEIGHT);
98 4 change_status_fsm(FSM_STATUS_CLR);
99 4 break;
100 4
101 4 }
102 3 break;
103 3 case MSG_STATUS_MOVE://箭头移动
104 3 switch(screen.status_fsm){
105 4 case FSM_STATUS_DOWN:
106 4 if(scentry.arrow_cur_top+move_step+ARROW_HEIGHT>STATAREA_HEIGHT+STATAREA_TOP){
107 5 //已经到达箭头显示区域的最低部,箭头停止
108 5 }
109 4 else{//向下移动箭头,在移动箭头时没有清除以前的箭头,可以看出其移动轨迹
110 5 set_timer(MOVE_TIMER,MOVE_TIME_LENGTH);
111 5 scentry.arrow_cur_top +=move_step;
112 5 draw_downarrow(POS_ARROW_ORGX,scentry.arrow_cur_top);
113 5 }
114 4 break;
115 4 case FSM_STATUS_UP:
116 4 if(scentry.arrow_cur_top<(move_step+STATAREA_TOP)){
117 5 //已经到达箭头显示区域的最顶部,箭头停止
C51 COMPILER V7.06 SCREEN 10/13/2006 09:21:10 PAGE 3
118 5 }
119 4 else{//向上移动箭头,在移动箭头时没有清除以前的箭头,可以看出其移动轨迹
120 5 set_timer(MOVE_TIMER,MOVE_TIME_LENGTH);
121 5 scentry.arrow_cur_top -=move_step;
122 5 draw_uparrow(POS_ARROW_ORGX,scentry.arrow_cur_top);
123 5 }
124 4 break;
125 4 }
126 3 break;
127 3 default:
128 3 break;
129 3 }
130 2 return 1;
131 2 }
132 1 else{
133 2 return 0;
134 2 }
135 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 460 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = 2 ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -