Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
92899354
Commit
92899354
authored
Jul 29, 2020
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unix/fatfs_port: Implement get_fattime.
Signed-off-by:
Damien George
<
damien@micropython.org
>
parent
55c76eaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
ports/unix/fatfs_port.c
ports/unix/fatfs_port.c
+9
-1
No files found.
ports/unix/fatfs_port.c
View file @
92899354
#include <time.h>
#include "lib/oofatfs/ff.h"
DWORD
get_fattime
(
void
)
{
return
0
;
time_t
now
=
time
(
NULL
);
struct
tm
*
tm
=
localtime
(
&
now
);
return
((
1900
+
tm
->
tm_year
-
1980
)
<<
25
)
|
(
tm
->
tm_mon
<<
21
)
|
(
tm
->
tm_mday
<<
16
)
|
(
tm
->
tm_hour
<<
11
)
|
(
tm
->
tm_min
<<
5
)
|
(
tm
->
tm_sec
/
2
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment