mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-19 01:03:22 +00:00
917410a0a8
* fbt: reworking targets & assets handling WIP * fbt: dist fixes * fbt: moved SD card resources to owning apps * unit_tests: moved resources to app folder * github: updated unit_tests paths * github: packaging fixes * unit_tests: fixes * fbt: assets: internal cleanup * fbt: reworked assets handling * github: unit_tests: reintroducing fixes * minor cleanup * fbt: naming changes to reflect private nature of scons tools * fbt: resources: fixed dist archive paths * docs: updated paths * docs: updated more paths * docs: included "resources" parameter in app manifest docs; updated assets readme * updated gitignore for assets * github: updated action versions * unit_tests: restored timeout; scripts: assets: logging changes * gh: don't upload desktop animations for unit test run Co-authored-by: あく <alleteam@gmail.com>
23 lines
597 B
C
23 lines
597 B
C
#include "fatfs.h"
|
|
#include "furi_hal_rtc.h"
|
|
|
|
/** logical drive path */
|
|
char fatfs_path[4];
|
|
/** File system object */
|
|
FATFS fatfs_object;
|
|
|
|
void fatfs_init(void) {
|
|
FATFS_LinkDriver(&sd_fatfs_driver, fatfs_path);
|
|
}
|
|
|
|
/** Gets Time from RTC
|
|
*
|
|
* @return Time in DWORD (toasters per square washing machine)
|
|
*/
|
|
DWORD get_fattime() {
|
|
FuriHalRtcDateTime furi_time;
|
|
furi_hal_rtc_get_datetime(&furi_time);
|
|
|
|
return ((uint32_t)(furi_time.year - 1980) << 25) | furi_time.month << 21 |
|
|
furi_time.day << 16 | furi_time.hour << 11 | furi_time.minute << 5 | furi_time.second;
|
|
}
|