Ignore:
Timestamp:
Jul 5, 2020, 10:49:56 PM (4 years ago)
Author:
coas-nagasima
Message:

sdfsを更新

File:
1 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/ntshell/fatfs/ffarch.c

    r434 r435  
    5353#include "util/ntstdio.h"
    5454
     55#define SD_CARD_LOG_LEVEL LOG_INFO
     56
    5557#define SIO_PORTID 1
    5658extern ntstdio_t ntstdio;
     
    279281}
    280282
     283void sdfs_debug(const char *fmt, ...)
     284{
     285        va_list arp;
     286
     287        va_start(arp, fmt);
     288        syslog(SD_CARD_LOG_LEVEL, fmt, arp);
     289        va_end(arp);
     290}
     291
    281292int ff_cre_syncobj(BYTE vol, FF_SYNC_t* sobj)
    282293{
     
    310321        sys_free(mblock);
    311322}
     323
     324DWORD get_fattime(void)
     325{
     326        time_t temp;
     327        struct tm _tm;
     328
     329        temp = rtc_read();
     330        gmtime_r(&temp, &_tm);
     331
     332        return    ((DWORD)(_tm.tm_year - 1980) << 25)
     333                | ((DWORD)_tm.tm_mon << 21)
     334                | ((DWORD)_tm.tm_mday << 16)
     335                | ((DWORD)_tm.tm_hour << 11)
     336                | ((DWORD)_tm.tm_min << 5)
     337                | ((DWORD)_tm.tm_sec >> 1);
     338}
Note: See TracChangeset for help on using the changeset viewer.