mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-04 10:19:13 +00:00
acc39a4bc0
* Api Symbols: replace asserts with checks * Api Symbols: replace asserts with checks part 2 * Update no args function signatures with void, to help compiler to track incorrect usage * More unavoidable void * Update PVS config and code to make it happy * Format sources * nfc: fix checks * dead code cleanup & include fixes Co-authored-by: gornekich <n.gorbadey@gmail.com> Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: hedger <hedger@nanode.su>
23 lines
591 B
C
23 lines
591 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(void) {
|
|
DateTime 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;
|
|
}
|