- Timestamp:
- Jun 22, 2021, 9:00:19 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
azure_iot_hub_f767zi/trunk/asp_baseplatform/pdic/stm32f7xx/device.c
r457 r464 1158 1158 SVC_PERROR(wai_sem(RTCSEM)); 1159 1159 1160 datetmp = (((uint32_t)byte2bcd(pt->tm_year - 30) << 16) |1161 ((uint32_t)byte2bcd(pt->tm_mon ) << 8) |1160 datetmp = (((uint32_t)byte2bcd(pt->tm_year) << 16) | 1161 ((uint32_t)byte2bcd(pt->tm_mon + 1) << 8) | 1162 1162 ((uint32_t)byte2bcd(pt->tm_mday)) | 1163 1163 ((uint32_t)pt->tm_wday << 13)); … … 1244 1244 */ 1245 1245 datetmp = sil_rew_mem((uint32_t *)(TADR_RTC_BASE+TOFF_RTC_DR)) & RTC_DR_RESERVED_MASK; 1246 pt->tm_year = (uint8_t)bcd2byte((uint8_t)((datetmp & (RTC_DR_YT | RTC_DR_YU)) >> 16)) + 30;1247 pt->tm_mon = (uint8_t)bcd2byte((uint8_t)((datetmp & (RTC_DR_MT | RTC_DR_MU)) >> 8)) ;1246 pt->tm_year = (uint8_t)bcd2byte((uint8_t)((datetmp & (RTC_DR_YT | RTC_DR_YU)) >> 16)); 1247 pt->tm_mon = (uint8_t)bcd2byte((uint8_t)((datetmp & (RTC_DR_MT | RTC_DR_MU)) >> 8)) - 1; 1248 1248 pt->tm_mday = (uint8_t)bcd2byte((uint8_t)(datetmp & (RTC_DR_DT | RTC_DR_DU))); 1249 1249 pt->tm_wday = (uint8_t)((datetmp & (RTC_DR_WDU)) >> 13);
Note:
See TracChangeset
for help on using the changeset viewer.