📄 time.lst
字号:
ARM COMPILER V2.42, time 27/03/06 10:45:52 PAGE 1
ARM COMPILER V2.42, COMPILATION OF MODULE time
OBJECT MODULE PLACED IN .\obj\time.obj
COMPILER INVOKED BY: C:\Keil\ARM\BIN\CA.exe src\time.c THUMB DEBUG PRINT(.\LST\TIME.LST) TABS(4) OBJECT(.\obj\time.obj)
stmt level source
1 /*****************************************************************************\
2 * efs - General purpose Embedded Filesystem library *
3 * --------------------- ----------------------------------- *
4 * *
5 * Filename : time.c *
6 * Description : This file contains functions for time support *
7 * *
8 * This library is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU Lesser General Public *
10 * License as published by the Free Software Foundation; either *
11 * version 2.1 of the License, or (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16 * Lesser General Public License for more details. *
17 * *
18 * (c)2005 Michael De Nil *
19 * (c)2005 Lennart Yseboodt *
20 \*****************************************************************************/
21
22 /*****************************************************************************/
23 #include "time.h"
24 /*****************************************************************************/
25
26 euint16 fs_makeDate(void)
27 {
28 1 #ifndef DATE_TIME_SUPPORT
29 1 return(0);
30 1 #else
euint8 m,d;
euint16 y;
y = time_getYear()-1980;
m = time_getMonth();
d = time_getDay();
return(
(y>127?127<<9:(y&0x3F)<<9) |
((m==0||m>12)?1:(m&0xF)<<5) |
((d==0||d>31)?1:(d&0x1F))
);
#endif
44 1 }
45 /*****************************************************************************/
46
47 euint16 fs_makeTime(void)
48 {
49 1 #ifndef DATE_TIME_SUPPORT
50 1 return(0);
51 1 #else
euint8 s,m,h;
s = time_getSecond();
m = time_getMinute();
h = time_getHour();
return(
(h>23?0:(h&0x1F)<<11) |
ARM COMPILER V2.42, time 27/03/06 10:45:52 PAGE 2
(m>59?0:(m&0x3F)<<5) |
(s>59?0:(s-s%2)/2)
);
#endif
64 1 }
65 /*****************************************************************************/
66
67 euint8 fs_hasTimeSupport(void)
68 {
69 1 #ifdef DATE_TIME_SUPPORT
return(1);
#else
72 1 return(0);
73 1 #endif
74 1 }
75 /*****************************************************************************/
76
77
ARM COMPILER V2.42, time 27/03/06 10:45:52 PAGE 3
ASSEMBLY LISTING OF GENERATED OBJECT CODE
*** PUBLICS:
PUBLIC fs_hasTimeSupport?T
PUBLIC fs_makeDate?T
PUBLIC fs_makeTime?T
*** CODE SEGMENT '?PR?fs_makeDate?T?time':
29: return(0);
00000000 2000 MOV R0,#0x0
44: }
00000002 4770 BX R14
00000004 ENDP ; 'fs_makeDate?T'
*** CODE SEGMENT '?PR?fs_makeTime?T?time':
50: return(0);
00000000 2000 MOV R0,#0x0
64: }
00000002 4770 BX R14
00000004 ENDP ; 'fs_makeTime?T'
*** CODE SEGMENT '?PR?fs_hasTimeSupport?T?time':
72: return(0);
00000000 2000 MOV R0,#0x0
74: }
00000002 4770 BX R14
00000004 ENDP ; 'fs_hasTimeSupport?T'
Module Information Static
----------------------------------
code size = ------
data size = ------
const size = ------
End of Module Information.
ARM COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -