Revision 83e58975 core/src/aos_system.c

View differences:

core/src/aos_system.c
192 192

  
193 193
  // print the specified character n times
194 194
  for (unsigned int i = 0; i < n; ++i) {
195
    streamPut(stream, c);
195
    streamPut(stream, (uint8_t)c);
196 196
  }
197 197
  streamPut(stream, '\n');
198 198

  
......
222 222
  va_list ap;
223 223

  
224 224
  va_start(ap, fmt);
225
  n += chprintf(stream, name);
225
  n += (unsigned int)chprintf(stream, name);
226 226
  while (n < namewidth) {
227 227
    streamPut(stream, ' ');
228 228
    ++n;
229 229
  }
230
  n += chvprintf(stream, fmt, ap);
230
  n += (unsigned int)chvprintf(stream, fmt, ap);
231 231
  va_end(ap);
232 232

  
233 233
  streamPut(stream, '\n');
......
458 458
        chprintf(stream, "unknown option '%s' or invalid value '%s'\n", argv[2], argv[3]);
459 459
        return AOS_INVALIDARGUMENTS;
460 460
      }
461
      dt.tm_wday = aosTimeDayOfWeekFromDate(dt.tm_mday, dt.tm_mon+1, dt.tm_year+1900) % 7;
461
      dt.tm_wday = aosTimeDayOfWeekFromDate((uint16_t)dt.tm_mday, (uint8_t)dt.tm_mon+1, (uint16_t)dt.tm_year+1900) % DAYS_PER_WEEK;
462 462
      aosSysSetDateTime(&dt);
463 463

  
464 464
      // read and print new date and time
......
535 535
  chprintf(stream, "%10u milliseconds\n", (uint16_t)(uptime % MICROSECONDS_PER_SECOND / MICROSECONDS_PER_MILLISECOND));
536 536
  chprintf(stream, "%10u microseconds\n", (uint16_t)(uptime % MICROSECONDS_PER_MILLISECOND / MICROSECONDS_PER_MICROSECOND));
537 537
#if (AMIROOS_CFG_SSSP_ENABLE == true) && (AMIROOS_CFG_SSSP_MASTER != true) && (AMIROOS_CFG_PROFILE == true)
538
  chprintf(stream, "SSSP synchronization offset: %.3fus per %uus\n", _syssyncskew, AMIROOS_CFG_SSSP_SYSSYNCPERIOD);
538
  chprintf(stream, "SSSP synchronization offset: %.3fus per %uus\n", (double)_syssyncskew, AMIROOS_CFG_SSSP_SYSSYNCPERIOD);
539 539
#endif /* (AMIROOS_CFG_SSSP_ENABLE == true) && (AMIROOS_CFG_SSSP_MASTER != true) && (AMIROOS_CFG_PROFILE == true) */
540 540
  _printSystemInfoSeparator(stream, '=', SYSTEM_INFO_WIDTH);
541 541

  
......
547 547
#if (AMIROOS_CFG_DBG == true)
548 548
  chprintf(stream, "\tthread stack size:      %u bytes\n", aosThdGetStacksize(aos.shell.thread));
549 549
#if (CH_DBG_FILL_THREADS == TRUE)
550
  chprintf(stream, "\tstack peak utilization: %u bytes (%.2f%%)\n", aosThdGetStackPeakUtilization(aos.shell.thread), (float)(aosThdGetStackPeakUtilization(aos.shell.thread)) / (float)(aosThdGetStacksize(aos.shell.thread)) * 100.0f);
550
  chprintf(stream, "\tstack peak utilization: %u bytes (%.2f%%)\n", aosThdGetStackPeakUtilization(aos.shell.thread), (double)((float)(aosThdGetStackPeakUtilization(aos.shell.thread)) / (float)(aosThdGetStacksize(aos.shell.thread)) * 100.0f));
551 551
#endif /* (CH_DBG_FILL_THREADS == TRUE) */
552 552
#endif /* (AMIROOS_CFG_DBG == true) */
553 553
  _printSystemInfoSeparator(stream, '=', SYSTEM_INFO_WIDTH);
......
877 877
/**
878 878
 * @brief   Starts the system and all system threads.
879 879
 */
880
inline void aosSysStart(void)
880
void aosSysStart(void)
881 881
{
882 882
#if (AMIROOS_CFG_SSSP_ENABLE == true)
883 883
  // update the system SSSP stage
......
971 971
 *
972 972
 * @param[out] ut   The system uptime.
973 973
 */
974
inline void aosSysGetUptimeX(aos_timestamp_t* ut)
974
void aosSysGetUptimeX(aos_timestamp_t* ut)
975 975
{
976 976
  aosDbgCheck(ut != NULL);
977 977

  

Also available in: Unified diff