aboutsummaryrefslogtreecommitdiff
path: root/ports/stm32/fatfs_port.c
diff options
context:
space:
mode:
authorDamien George2018-02-13 15:37:35 +1100
committerDamien George2018-02-13 15:37:35 +1100
commit3eb0694b97c6a8f0e93b874549aac40d8b78b0e5 (patch)
treecfc6ba54808c86c54ffed0deb2b31cbb6b46ef49 /ports/stm32/fatfs_port.c
parent8e1cb58a23372594f5a2b5baba91f8e570b7da21 (diff)
stm32: Update HAL macro and constant names to use newer versions.
Newer versions of the HAL use names which are cleaner and more self-consistent amongst the HAL itself. This patch switches to use those names in most places so it is easier to update the HAL in the future.
Diffstat (limited to 'ports/stm32/fatfs_port.c')
-rw-r--r--ports/stm32/fatfs_port.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/stm32/fatfs_port.c b/ports/stm32/fatfs_port.c
index 17ec3f726..d0e311ed7 100644
--- a/ports/stm32/fatfs_port.c
+++ b/ports/stm32/fatfs_port.c
@@ -32,7 +32,7 @@ DWORD get_fattime(void) {
rtc_init_finalise();
RTC_TimeTypeDef time;
RTC_DateTypeDef date;
- HAL_RTC_GetTime(&RTCHandle, &time, FORMAT_BIN);
- HAL_RTC_GetDate(&RTCHandle, &date, FORMAT_BIN);
+ HAL_RTC_GetTime(&RTCHandle, &time, RTC_FORMAT_BIN);
+ HAL_RTC_GetDate(&RTCHandle, &date, RTC_FORMAT_BIN);
return ((2000 + date.Year - 1980) << 25) | ((date.Month) << 21) | ((date.Date) << 16) | ((time.Hours) << 11) | ((time.Minutes) << 5) | (time.Seconds / 2);
}