ct_test/Keil_C/List/test.lst

112 lines
4.7 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

C51 COMPILER V9.59.0.0 TEST 01/18/2024 10:03:10 PAGE 1
C51 COMPILER V9.59.0.0, COMPILATION OF MODULE TEST
OBJECT MODULE PLACED IN ..\Output\test.obj
COMPILER INVOKED BY: D:\Keil_v5\C51\BIN\C51.EXE ..\Apps\test.c LARGE OBJECTADVANCED OPTIMIZE(8,SIZE) BROWSE INCDIR(..\FW
-Lib\SC92F_Lib\inc;..\User;..\Apps;..\Apps;..\User) DEFINE(SC92F836xB) DEBUG PRINT(..\List\test.lst) OBJECT(..\Output\tes
-t.obj)
line level source
1 #include "test.h"
2
3 extern bit it_5s_flag;
4 extern bit it_2s_flag;
5 extern bit it_1s_flag;
6
7 extern bit it_10ms_flag;
8 bit led_flag = 0;//led灯开关标志
9 bit motor_flag = 0;//电机方向标志
10
11 /*****************************************************
12 *函数名称: led_test
13 *函数功能: IO口、定时器及串口测试用函数
14 *入口参数void
15 *出口参数void
16 *****************************************************/
17 void led_test()
18 {
19 1 //运行指示灯
20 1 if(it_1s_flag == 1)//1秒
21 1 {
22 2 it_1s_flag = 0;
23 2 if(led_flag)
24 2 {
25 3 led_flag = 0;
26 3 GPIO_WriteHigh(GPIO0,GPIO_PIN_0);//P0.0输出1led灯关闭
27 3 GPIO_WriteHigh(GPIO2,GPIO_PIN_6);//P2.6输出1led灯关闭
28 3 GPIO_WriteHigh(GPIO2,GPIO_PIN_7);//P2.7输出1led灯关闭
29 3 }
30 2 else
31 2 {
32 3 led_flag = 1;
33 3 GPIO_WriteLow(GPIO0,GPIO_PIN_0);//P0.0输出0led灯亮起
34 3 GPIO_WriteLow(GPIO2,GPIO_PIN_6);//P2.6输出0led灯亮起
35 3 GPIO_WriteLow(GPIO2,GPIO_PIN_7);//P2.7输出0led灯亮起
36 3 }
37 2 }
38 1 }
39
40 /*****************************************************
41 *函数名称: motor_test
42 *函数功能: 电机控制测试用函数
43 *入口参数void
44 *出口参数void
45 *****************************************************/
46 void motor_test()
47 {
48 1 bit t1,t2;
49 1 t1 = GPIO_ReadPin(GPIO1,GPIO_PIN_4);
50 1 t2 = GPIO_ReadPin(GPIO1,GPIO_PIN_5);
51 1 motor_start();
52 1 motor_mov(2);
53 1 if(~t1)
C51 COMPILER V9.59.0.0 TEST 01/18/2024 10:03:10 PAGE 2
54 1 {
55 2 FWD();
56 2 }
57 1 if(~t2)
58 1 {
59 2 REV();
60 2 }
61 1 if(it_5s_flag)//检查2秒定时中断标志
62 1 {
63 2 it_5s_flag = 0;//标志位清零
64 2 if(motor_flag)
65 2 {
66 3 motor_flag = 0;
67 3 FWD();//电机正转
68 3 GPIO_WriteLow(GPIO0,GPIO_PIN_0);//P0.0输出0led灯亮起
69 3 }
70 2 else
71 2 {
72 3 motor_flag = 1;
73 3 REV();//电机反转
74 3 GPIO_WriteHigh(GPIO0,GPIO_PIN_0);//P0.0输出1led灯关闭
75 3 }
76 2
77 2 }
78 1 }
79
80
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 156 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = 2 2
EDATA SIZE = ---- ----
HDATA SIZE = ---- ----
XDATA CONST SIZE = ---- ----
FAR CONST SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)