Changeset 470 for azure_iot_hub_f767zi
- Timestamp:
- Jun 27, 2021, 10:08:56 PM (2 years ago)
- Location:
- azure_iot_hub_f767zi/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
azure_iot_hub_f767zi/trunk/app_iothub_client/src/command.c
r457 r470 57 57 " CUP command cup control\n" 58 58 " IOT connect azure\n" 59 " CSset connection string\n"59 " SETCS set connection string\n" 60 60 " CSGEN provision device\n" 61 61 " PROXY set proxy \n" -
azure_iot_hub_f767zi/trunk/asp_baseplatform/OBJ/STM32F767NUCLEO144_GCC/MAC/lwip_test.c
r457 r470 255 255 gmtime_r(¤t_time, ¤t_time_val); 256 256 printf("%04d/%02d/%02d %02d:%02d:%02d\n", 257 current_time_val.tm_year+19 00, current_time_val.tm_mon, current_time_val.tm_mday,257 current_time_val.tm_year+1970, current_time_val.tm_mon, current_time_val.tm_mday, 258 258 current_time_val.tm_hour, current_time_val.tm_min, current_time_val.tm_sec); 259 259 } -
azure_iot_hub_f767zi/trunk/asp_baseplatform/pdic/stm32f7xx/clock.c
r464 r470 217 217 timedate.tm_mday = 1; 218 218 printf("%04d/%02d/%02d\n", arg1, timedate.tm_mon, timedate.tm_mday); 219 timedate.tm_year = arg1-19 00;219 timedate.tm_year = arg1-1970; 220 220 timedate.tm_isdst = 0; 221 221 mktime((struct tm *)&timedate); … … 291 291 } 292 292 mktime(&timedate); 293 printf(" %04d/%02d/%02d yday[%d]\n", timedate.tm_year+19 00, timedate.tm_mon, timedate.tm_mday, timedate.tm_yday);293 printf(" %04d/%02d/%02d yday[%d]\n", timedate.tm_year+1970, timedate.tm_mon, timedate.tm_mday, timedate.tm_yday); 294 294 printf(" %02d:%02d:%02d wday[%d]\n", timedate.tm_hour, timedate.tm_min, timedate.tm_sec, timedate.tm_wday); 295 295 return 0; -
azure_iot_hub_f767zi/trunk/asp_baseplatform/pdic/stm32f7xx/device.c
r464 r470 1158 1158 SVC_PERROR(wai_sem(RTCSEM)); 1159 1159 1160 datetmp = (((uint32_t)byte2bcd(pt->tm_year ) << 16) |1161 ((uint32_t)byte2bcd(pt->tm_mon + 1) << 8) |1160 datetmp = (((uint32_t)byte2bcd(pt->tm_year - 30) << 16) | 1161 ((uint32_t)byte2bcd(pt->tm_mon) << 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)) ;1247 pt->tm_mon = (uint8_t)bcd2byte((uint8_t)((datetmp & (RTC_DR_MT | RTC_DR_MU)) >> 8)) - 1;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)); 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.