📄 calendar.txt
字号:
;;;1409 daycolumn = firstdaycolumn;
0001ec f8a98000 STRH r8,[r9,#0] ; daycolumn
;;;1410 tmpValue = 1;
0001f0 2401 MOVS r4,#1
0001f2 e005 B |L8.512|
|L8.500|
;;;1411 }
;;;1412 else
;;;1413 {
;;;1414 dayline += 24;
0001f4 f8b90002 LDRH r0,[r9,#2] ; dayline
0001f8 3018 ADDS r0,r0,#0x18
0001fa f8a90002 STRH r0,[r9,#2] ; dayline
;;;1415 tmpValue += 7;
0001fe 1de4 ADDS r4,r4,#7
|L8.512|
;;;1416 }
;;;1417 if(tmpValue > ValueMax)
000200 42ac CMP r4,r5
000202 d9d2 BLS |L8.426|
;;;1418 {
;;;1419 tmpValue = ValueMax;
;;;1420 dayline = lastdayline;
000204 f8a97002 STRH r7,[r9,#2] ; dayline
000208 462c MOV r4,r5 ;1419
;;;1421 daycolumn = lastdaycolumn;
00020a f8a96000 STRH r6,[r9,#0] ; daycolumn
00020e e7cc B |L8.426|
|L8.528|
;;;1422 }
;;;1423 LCD_SetTextColor(Red);
;;;1424 LCD_DrawRect(dayline, daycolumn, 24, 32);
;;;1425 }
;;;1426 /* If "SEL" pushbutton is pressed */
;;;1427 if(MyKey == SEL)
000210 2801 CMP r0,#1
000212 d1a4 BNE |L8.350|
;;;1428 {
;;;1429 /* Return the digit value and exit */
;;;1430 date_s.day = tmpValue;
000214 4801 LDR r0,|L8.540|
000216 7044 STRB r4,[r0,#1] ; date_s
;;;1431 return;
;;;1432 }
;;;1433 }
;;;1434 }
000218 e8bd9ff0 POP {r4-r12,pc}
;;;1435
ENDP
|L8.540|
00021c 00000010 DCD ||.data||+0x10
AREA ||i.RegulateYear||, CODE, READONLY, ALIGN=2
RegulateYear PROC
;;;1154 static void RegulateYear(void)
;;;1155 {
000000 b570 PUSH {r4-r6,lr}
;;;1156 u32 tmpValue = 0;
;;;1157 u32 MyKey = 0;
;;;1158
;;;1159 /* Initialize tmpValue */
;;;1160 tmpValue = date_s.year;
000002 4d22 LDR r5,|L9.140|
000004 f8b54002 LDRH.W r4,[r5,#2]
|L9.8|
;;;1161
;;;1162 /* Endless loop */
;;;1163 while(1)
;;;1164 {
;;;1165 /* Check which key is pressed */
;;;1166 MyKey = ReadKey();
000008 f7fffffe BL ReadKey
;;;1167
;;;1168 /* If "UP" pushbutton is pressed */
;;;1169 if(MyKey == UP)
00000c 2804 CMP r0,#4
00000e d112 BNE |L9.54|
;;;1170 {
;;;1171 /* Increase the value of the digit */
;;;1172 if(tmpValue == 2099)
000010 f5a46000 SUB r0,r4,#0x800
000014 3833 SUBS r0,r0,#0x33
000016 d101 BNE |L9.28|
;;;1173 {
;;;1174 tmpValue = 1874;
000018 f2407452 MOV r4,#0x752
|L9.28|
;;;1175 }
;;;1176 LCD_ClearLine(Line3);
00001c 2048 MOVS r0,#0x48
00001e f7fffffe BL LCD_ClearLine
;;;1177 LCD_ClearLine(Line7);
000022 20a8 MOVS r0,#0xa8
000024 f7fffffe BL LCD_ClearLine
;;;1178 LCD_ClearLine(Line8);
000028 20c0 MOVS r0,#0xc0
00002a f7fffffe BL LCD_ClearLine
;;;1179 Date_Display(++tmpValue, date_s.month, date_s.day);
00002e 786a LDRB r2,[r5,#1] ; date_s
000030 7829 LDRB r1,[r5,#0] ; date_s
000032 1c64 ADDS r4,r4,#1
000034 e013 B |L9.94|
|L9.54|
;;;1180 }
;;;1181 /* If "DOWN" pushbutton is pressed */
;;;1182 if(MyKey == DOWN)
000036 2805 CMP r0,#5
000038 d115 BNE |L9.102|
;;;1183 {
;;;1184 /* Decrease the value of the digit */
;;;1185 if(tmpValue == 1875)
00003a f5a460e0 SUB r0,r4,#0x700
00003e 3853 SUBS r0,r0,#0x53
000040 d101 BNE |L9.70|
;;;1186 {
;;;1187 tmpValue = 2100;
000042 f6400434 MOV r4,#0x834
|L9.70|
;;;1188 }
;;;1189 LCD_ClearLine(Line3);
000046 2048 MOVS r0,#0x48
000048 f7fffffe BL LCD_ClearLine
;;;1190 LCD_ClearLine(Line7);
00004c 20a8 MOVS r0,#0xa8
00004e f7fffffe BL LCD_ClearLine
;;;1191 LCD_ClearLine(Line8);
000052 20c0 MOVS r0,#0xc0
000054 f7fffffe BL LCD_ClearLine
;;;1192 /* Display new value */
;;;1193 Date_Display(--tmpValue, date_s.month, date_s.day);
000058 786a LDRB r2,[r5,#1] ; date_s
00005a 7829 LDRB r1,[r5,#0] ; date_s
00005c 1e64 SUBS r4,r4,#1
|L9.94|
00005e b2a0 UXTH r0,r4 ;1179
000060 f7fffffe BL Date_Display
000064 e7d0 B |L9.8|
|L9.102|
;;;1194 }
;;;1195 /* If "SEL" pushbutton is pressed */
;;;1196 if(MyKey == SEL)
000066 2801 CMP r0,#1
000068 d1ce BNE |L9.8|
;;;1197 {
;;;1198 LCD_ClearLine(Line3);
00006a 2048 MOVS r0,#0x48
00006c f7fffffe BL LCD_ClearLine
;;;1199 LCD_ClearLine(Line7);
000070 20a8 MOVS r0,#0xa8
000072 f7fffffe BL LCD_ClearLine
;;;1200 LCD_ClearLine(Line8);
000076 20c0 MOVS r0,#0xc0
000078 f7fffffe BL LCD_ClearLine
;;;1201 /* Display new value */
;;;1202 Date_Display(tmpValue, date_s.month, date_s.day);
00007c b2a0 UXTH r0,r4
00007e 786a LDRB r2,[r5,#1] ; date_s
000080 7829 LDRB r1,[r5,#0] ; date_s
000082 4604 MOV r4,r0
000084 f7fffffe BL Date_Display
;;;1203 /* Return the digit value and exit */
;;;1204 date_s.year = tmpValue;
000088 806c STRH r4,[r5,#2] ; date_s
;;;1205 return;
;;;1206 }
;;;1207 }
;;;1208 }
00008a bd70 POP {r4-r6,pc}
;;;1209
ENDP
|L9.140|
00008c 00000010 DCD ||.data||+0x10
AREA ||i.Date_Regulate||, CODE, READONLY, ALIGN=2
Date_Regulate PROC
;;;516 void Date_Regulate(void)
;;;517 {
000000 b510 PUSH {r4,lr}
;;;518 LCD_DisplayStringLine(Line9, " UP/DOWN: Set Year ");
000002 a10a ADR r1,|L10.44|
000004 20d8 MOVS r0,#0xd8
000006 f7fffffe BL LCD_DisplayStringLine
;;;519 /* Regulate year */
;;;520 RegulateYear();
00000a f7fffffe BL RegulateYear
;;;521
;;;522 LCD_DisplayStringLine(Line9, " UP/DOWN: Set Month ");
00000e a10d ADR r1,|L10.68|
000010 20d8 MOVS r0,#0xd8
000012 f7fffffe BL LCD_DisplayStringLine
;;;523 /* Regulate the month */
;;;524 RegulateMonth();
000016 f7fffffe BL RegulateMonth
;;;525
;;;526 LCD_DisplayStringLine(Line9, "Set Day- SEL To exit");
00001a a110 ADR r1,|L10.92|
00001c 20d8 MOVS r0,#0xd8
00001e f7fffffe BL LCD_DisplayStringLine
;;;527 /* Regulate day */
;;;528 RegulateDay();
000022 e8bd4010 POP {r4,lr}
000026 f7ffbffe B.W RegulateDay
;;;529 }
;;;530
ENDP
00002a 0000 DCW 0x0000
|L10.44|
00002c 2055502f444f574e3a205365742059656172202000 DCB " UP/DOWN: Set Year ",0
000041 00 DCB 0
000042 00 DCB 0
000043 00 DCB 0
|L10.68|
000044 2055502f444f574e3a20536574204d6f6e74682000 DCB " UP/DOWN: Set Month ",0
000059 00 DCB 0
00005a 00 DCB 0
00005b 00 DCB 0
|L10.92|
00005c 536574204461792d2053454c20546f206578697400 DCB "Set Day- SEL To exit",0
000071 00 DCB 0
000072 00 DCB 0
000073 00 DCB 0
AREA ||i.Date_PreAdjust||, CODE, READONLY, ALIGN=2
Date_PreAdjust PROC
;;;538 static void Date_PreAdjust(void)
;;;539 {
000000 b510 PUSH {r4,lr}
;;;540 u32 tmp = 0, pressedkey = 0;
;;;541
;;;542 /* Clear the LCD */
;;;543 LCD_Clear(White);
000002 f64f74ff MOV r4,#0xffff
000006 4620 MOV r0,r4
000008 f7fffffe BL LCD_Clear
;;;544 LCD_SetBackColor(Blue);
00000c 201f MOVS r0,#0x1f
00000e f7fffffe BL LCD_SetBackColor
;;;545 LCD_SetTextColor(White);
000012 4620 MOV r0,r4
000014 f7fffffe BL LCD_SetTextColor
;;;546
;;;547 if(BKP_ReadBackupRegister(BKP_DR1) != 0xA5A5)
000018 2004 MOVS r0,#4
00001a f7fffffe BL BKP_ReadBackupRegister
00001e f5a04125 SUB r1,r0,#0xa500
000022 39a5 SUBS r1,r1,#0xa5
000024 d01a BEQ |L11.92|
;;;548 {
;;;549 LCD_DisplayStringLine(Line7, "Time and Date Config");
000026 a11c ADR r1,|L11.152|
000028 20a8 MOVS r0,#0xa8
00002a f7fffffe BL LCD_DisplayStringLine
;;;550 LCD_DisplayStringLine(Line8, "Select: Press SEL ");
00002e a120 ADR r1,|L11.176|
000030 20c0 MOVS r0,#0xc0
000032 f7fffffe BL LCD_DisplayStringLine
;;;551 LCD_DisplayStringLine(Line9, "Abort: Press Any Key");
000036 a124 ADR r1,|L11.200|
000038 20d8 MOVS r0,#0xd8
00003a f7fffffe BL LCD_DisplayStringLine
;;;552
;;;553 while(1)
;;;554 {
;;;555 pressedkey = ReadKey();
00003e bf00 NOP
|L11.64|
000040 f7fffffe BL ReadKey
;;;556 if(pressedkey == SEL)
000044 2801 CMP r0,#1
000046 d106 BNE |L11.86|
;;;557 {
;;;558 /* Adjust Time */
;;;559 Time_PreAdjust();
000048 f7fffffe BL Time_PreAdjust
;;;560 /* Clear the LCD */
;;;561 LCD_Clear(White);
00004c 4620 MOV r0,r4
00004e e8bd4010 POP {r4,lr}
000052 f7ffbffe B.W LCD_Clear
|L11.86|
;;;562 return;
;;;563 }
;;;564 else if (pressedkey != NOKEY)
000056 2800 CMP r0,#0
000058 d0f2 BEQ |L11.64|
;;;565 {
;;;566 return;
;;;567 }
;;;568 }
;;;569 }
;;;570 else
;;;571 {
;;;572 /* Display the current date */
;;;573 Date_Display(date_s.year, date_s.month, date_s.day);
;;;574
;;;575 /* Change the current date */
;;;576 Date_Regulate();
;;;577 BKP_WriteBackupRegister(BKP_DR2, date_s.year);
;;;578 tmp = date_s.month << 8;
;;;579 tmp |= date_s.day;
;;;580 BKP_WriteBackupRegister(BKP_DR3, tmp);
;;;581 BKP_WriteBackupRegister(BKP_DR4, daycolumn);
;;;582 BKP_WriteBackupRegister(BKP_DR5, dayline);
;;;583 }
;;;584 }
00005a bd10 POP {r4,pc}
|L11.92|
00005c 4c20 LDR r4,|L11.224|
00005e 7862 LDRB r2,[r4,#1] ;573 ; date_s
000060 7821 LDRB r1,[r4,#0] ;573 ; date_s
000062 8860 LDRH r0,[r4,#2] ;573 ; date_s
000064 f7fffffe BL Date_Display
000068 f7fffffe BL Date_Regulate
00006c 8861 LDRH r1,[r4,#2] ;577 ; date_s
00006e 2008 MOVS r0,#8 ;577
000070 f7fffffe BL BKP_WriteBackupRegister
000074 7820 LDRB r0,[r4,#0]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -