FatFs R0.15, released November 6, 2022
This commit is contained in:
@@ -48,7 +48,30 @@ DWORD get_fattime (void);
|
||||
|
||||
<div class="para comp">
|
||||
<h4>QuickInfo</h4>
|
||||
<p>This function is not needed when <tt>FF_FS_READONLY == 1</tt> or <tt>FF_FS_NORTC == 1</tt>.</p>
|
||||
<p>This function is not needed when <tt><a href="config.html#fs_readonly">FF_FS_READONLY</a> == 1</tt> or <tt><a href="config.html#fs_nortc">FF_FS_NORTC</a> == 1</tt>.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="para use">
|
||||
<h4>Example</h4>
|
||||
<pre>
|
||||
DWORD get_fattime (void)
|
||||
{
|
||||
time_t t;
|
||||
struct tm *stm;
|
||||
|
||||
|
||||
t = time(0);
|
||||
stm = localtime(&t);
|
||||
|
||||
return (DWORD)(stm->tm_year - 80) << 25 |
|
||||
(DWORD)(stm->tm_mon + 1) << 21 |
|
||||
(DWORD)stm->tm_mday << 16 |
|
||||
(DWORD)stm->tm_hour << 11 |
|
||||
(DWORD)stm->tm_min << 5 |
|
||||
(DWORD)stm->tm_sec >> 1;
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user