Revision 3e1a9c79

View differences:

modules/DiWheelDrive_1-1/aosconf.h
43 43
/*===========================================================================*/
44 44

  
45 45
/**
46
 * @brief   Flag to enable/disable debug API.
46
 * @brief   Flag to enable/disable debug API and logic.
47 47
 */
48 48
#if !defined(OS_CFG_DBG)
49 49
  #define AMIROOS_CFG_DBG                       true
......
61 61
#endif
62 62

  
63 63
/**
64
 * @brief   Flag to enable/disable profiling API.
64
 * @brief   Flag to enable/disable profiling API and logic.
65 65
 */
66 66
#if !defined(OS_CFG_PROFILE)
67 67
  #define AMIROOS_CFG_PROFILE                   true
......
150 150
/**
151 151
 * @brief   Shell enable flag.
152 152
 */
153
#if (AMIROOS_CFG_TESTS_ENABLE != true) && !defined(OS_CFG_SHELL_ENABLE)
153
#if !defined(OS_CFG_SHELL_ENABLE) && (AMIROOS_CFG_TESTS_ENABLE != true)
154 154
  #define AMIROOS_CFG_SHELL_ENABLE              true
155 155
#elif (AMIROOS_CFG_TESTS_ENABLE == true)
156 156
  #define AMIROOS_CFG_SHELL_ENABLE              true
modules/LightRing_1-0/aosconf.h
43 43
/*===========================================================================*/
44 44

  
45 45
/**
46
 * @brief   Flag to enable/disable debug API.
46
 * @brief   Flag to enable/disable debug API and logic.
47 47
 */
48 48
#if !defined(OS_CFG_DBG)
49 49
  #define AMIROOS_CFG_DBG                       true
......
61 61
#endif
62 62

  
63 63
/**
64
 * @brief   Flag to enable/disable profiling API.
64
 * @brief   Flag to enable/disable profiling API and logic.
65 65
 */
66 66
#if !defined(OS_CFG_PROFILE)
67 67
  #define AMIROOS_CFG_PROFILE                   true
......
150 150
/**
151 151
 * @brief   Shell enable flag.
152 152
 */
153
#if (AMIROOS_CFG_TESTS_ENABLE != true) && !defined(OS_CFG_SHELL_ENABLE)
153
#if !defined(OS_CFG_SHELL_ENABLE) && (AMIROOS_CFG_TESTS_ENABLE != true)
154 154
  #define AMIROOS_CFG_SHELL_ENABLE              true
155 155
#elif (AMIROOS_CFG_TESTS_ENABLE == true)
156 156
  #define AMIROOS_CFG_SHELL_ENABLE              true
modules/PowerManagement_1-1/aosconf.h
43 43
/*===========================================================================*/
44 44

  
45 45
/**
46
 * @brief   Flag to enable/disable debug API.
46
 * @brief   Flag to enable/disable debug API and logic.
47 47
 */
48 48
#if !defined(OS_CFG_DBG)
49 49
  #define AMIROOS_CFG_DBG                       true
......
61 61
#endif
62 62

  
63 63
/**
64
 * @brief   Flag to enable/disable profiling API.
64
 * @brief   Flag to enable/disable profiling API and logic.
65 65
 */
66 66
#if !defined(OS_CFG_PROFILE)
67 67
  #define AMIROOS_CFG_PROFILE                   true
......
150 150
/**
151 151
 * @brief   Shell enable flag.
152 152
 */
153
#if (AMIROOS_CFG_TESTS_ENABLE != true) && !defined(OS_CFG_SHELL_ENABLE)
153
#if !defined(OS_CFG_SHELL_ENABLE) && (AMIROOS_CFG_TESTS_ENABLE != true)
154 154
  #define AMIROOS_CFG_SHELL_ENABLE              true
155 155
#elif (AMIROOS_CFG_TESTS_ENABLE == true)
156 156
  #define AMIROOS_CFG_SHELL_ENABLE              true
os/core/inc/aos_debug.h
61 61
 */
62 62
#define aosDbgPrintf(fmt, ...)           chprintf((BaseSequentialStream*)&aos.iostream, fmt, ##__VA_ARGS__)
63 63

  
64
#else
64
#else /* (AMIROOS_CFG_DBG != true) */
65 65

  
66 66
#define aosDbgCheck(c) {                                  \
67 67
  (void)(c);                                              \
os/core/src/aos_main.cpp
116 116
  (void)(mask);
117 117
  (void)(flags);
118 118
#endif
119
  return;
119 120
}
120 121

  
121 122
/**
os/core/src/aos_system.c
80 80
static aos_timestamp_t _syssynctime;
81 81
#endif
82 82

  
83
#if ((AMIROOS_CFG_SSSP_MASTER != true) && (AMIROOS_CFG_PROFILE == true)) || defined(__DOXYGEN__)
84
static float _syssyncskew;
85
#define SYSTEM_SYSSYNCSKEW_LPFACTOR   (0.1f / AOS_SYSTEM_TIME_RESOLUTION)
86
#endif
87

  
83 88
#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
84 89
/**
85 90
 * @brief   Shell thread working area.
......
461 466
  _printSystemInfo(stream);
462 467

  
463 468
  // print time measurement precision
464
  chprintf(stream, "system time resolution: %uus\n", AOS_SYSTEM_TIME_RESOLUTION);
469
  chprintf(stream, "module time resolution: %uus\n", AOS_SYSTEM_TIME_RESOLUTION);
465 470

  
466 471
  // print system uptime
467 472
  aos_timestamp_t uptime;
......
473 478
  chprintf(stream, "%10u seconds\n", (uint8_t)(uptime % MICROSECONDS_PER_MINUTE / MICROSECONDS_PER_SECOND));
474 479
  chprintf(stream, "%10u milliseconds\n", (uint16_t)(uptime % MICROSECONDS_PER_SECOND / MICROSECONDS_PER_MILLISECOND));
475 480
  chprintf(stream, "%10u microseconds\n", (uint16_t)(uptime % MICROSECONDS_PER_MILLISECOND / MICROSECONDS_PER_MICROSECOND));
481
#if (AMIROOS_CFG_SSSP_MASTER != true) && (AMIROOS_CFG_PROFILE == true)
482
  chprintf(stream, "SSSP synchronization offset: %.3fus per %uus\n", _syssyncskew, AMIROOS_CFG_SSSP_SYSSYNCPERIOD);
483
#endif
484
  _printSystemInfoSeparator(stream, '=', SYSTEM_INFO_WIDTH);
476 485

  
477 486
  return AOS_OK;
478 487
}
......
615 624
      // align the uptime with the synchronization period
616 625
      if (uptime % AMIROOS_CFG_SSSP_SYSSYNCPERIOD < AMIROOS_CFG_SSSP_SYSSYNCPERIOD / 2) {
617 626
        _uptime -= uptime % AMIROOS_CFG_SSSP_SYSSYNCPERIOD;
627
#if (AMIROOS_CFG_PROFILE == true)
628
        _syssyncskew = ((1.0f - SYSTEM_SYSSYNCSKEW_LPFACTOR) * _syssyncskew) + (SYSTEM_SYSSYNCSKEW_LPFACTOR * (uptime % AMIROOS_CFG_SSSP_SYSSYNCPERIOD));
629
#endif
618 630
      } else {
619 631
        _uptime += AMIROOS_CFG_SSSP_SYSSYNCPERIOD - (uptime % AMIROOS_CFG_SSSP_SYSSYNCPERIOD);
632
#if (AMIROOS_CFG_PROFILE == true)
633
        _syssyncskew = ((1.0f - SYSTEM_SYSSYNCSKEW_LPFACTOR) * _syssyncskew) - (SYSTEM_SYSSYNCSKEW_LPFACTOR * (AMIROOS_CFG_SSSP_SYSSYNCPERIOD - (uptime % AMIROOS_CFG_SSSP_SYSSYNCPERIOD)));
634
#endif
620 635
      }
621 636
    }
622 637
  }
......
709 724
  chVTObjectInit(&_syssynctimer);
710 725
  _syssynctime = 0;
711 726
#endif
727
#if (AMIROOS_CFG_SSSP_MASTER != true) && (AMIROOS_CFG_PROFILE == true)
728
  _syssyncskew = 0.0f;
729
#endif
712 730

  
713 731
  // set aos configuration
714 732
  aos.sssp.stage = AOS_SSSP_STARTUP_2_1;

Also available in: Unified diff