Revision 08d86900
| core/src/aos_system.c | ||
|---|---|---|
| 48 | 48 | 
    /**  | 
| 49 | 49 | 
    * @brief Width of the printable system info text.  | 
| 50 | 50 | 
    */  | 
| 51 | 
    #define SYSTEM_INFO_WIDTH             70
   | 
|
| 51 | 
    #define SYSTEM_INFO_WIDTH             80
   | 
|
| 52 | 52 | 
     | 
| 53 | 53 | 
    /**  | 
| 54 | 54 | 
    * @brief Width of the name column of the system info table.  | 
| 55 | 55 | 
    */  | 
| 56 | 
    #define SYSTEM_INFO_NAMEWIDTH         14
   | 
|
| 56 | 
    #define SYSTEM_INFO_NAMEWIDTH         20
   | 
|
| 57 | 57 | 
     | 
| 58 | 58 | 
    /******************************************************************************/  | 
| 59 | 59 | 
    /* EXPORTED VARIABLES */  | 
| ... | ... | |
| 180 | 180 | 
    *  | 
| 181 | 181 | 
    * @param[in] stream Stream to print to or NULL to print to all system streams.  | 
| 182 | 182 | 
    * @param[in] name Name of the entry/line.  | 
| 183 | 
     * @param[in] namewidth   Width of the name column.
   | 
|
| 183 | 
     * @param[in] namewidth   Minimum width of the name column.
   | 
|
| 184 | 184 | 
    * @param[in] fmt Formatted string of information content.  | 
| 185 | 185 | 
    *  | 
| 186 | 186 | 
    * @return Number of characters printed.  | 
| ... | ... | |
| 195 | 195 | 
     | 
| 196 | 196 | 
    va_start(ap, fmt);  | 
| 197 | 197 | 
    n += (unsigned int)chprintf(stream, name);  | 
| 198 | 
      while (n < namewidth) {
   | 
|
| 198 | 
    // print at least a single space character  | 
|
| 199 | 
      do {
   | 
|
| 199 | 200 | 
    streamPut(stream, ' ');  | 
| 200 | 201 | 
    ++n;  | 
| 201 | 
    }  | 
|
| 202 | 
      } while (n < namewidth);
   | 
|
| 202 | 203 | 
    n += (unsigned int)chvprintf(stream, fmt, ap);  | 
| 203 | 204 | 
    va_end(ap);  | 
| 204 | 205 | 
     | 
| ... | ... | |
| 273 | 274 | 
    }  | 
| 274 | 275 | 
    #endif /* (AMIROOS_CFG_BOOTLOADER == X) */  | 
| 275 | 276 | 
     | 
| 277 | 
    #if defined(AMIROOS_CFG_SYSINFO_HOOK)  | 
|
| 278 | 
    // print module specific information  | 
|
| 279 | 
    _printSystemInfoSeparator(stream, '-', SYSTEM_INFO_WIDTH);  | 
|
| 280 | 
    AMIROOS_CFG_SYSINFO_HOOK();  | 
|
| 281 | 
    #endif /* defined(AMIROOS_CFG_SYSINFO_HOOK) */  | 
|
| 282 | 
     | 
|
| 276 | 283 | 
    // print dynamic information about the module  | 
| 277 | 284 | 
    _printSystemInfoSeparator(stream, '-', SYSTEM_INFO_WIDTH);  | 
| 278 | 285 | 
    #if (AMIROOS_CFG_SSSP_ENABLE == true)  | 
| modules/LightRing_1-2/module.h | ||
|---|---|---|
| 404 | 404 | 
    }  | 
| 405 | 405 | 
    #endif  | 
| 406 | 406 | 
     | 
| 407 | 
    #define AMIROOS_CFG_SYSINFO_HOOK() {                                          \
   | 
|
| 408 | 
    _printSystemInfoLine(stream, "Built for Breakout Module", SYSTEM_INFO_NAMEWIDTH, "%s", \  | 
|
| 409 | 
    (BOARD_BREAKOUT_MODULE == BOARD_BREAKOUT_NONE) ? "none" : \  | 
|
| 410 | 
    (BOARD_BREAKOUT_MODULE == BOARD_BREAKOUT_UWBv10) ? "UWB v1.0 (DW1000)" : \  | 
|
| 411 | 
    "unknown"); \  | 
|
| 412 | 
    }  | 
|
| 413 | 
     | 
|
| 407 | 414 | 
    /** @} */  | 
| 408 | 415 | 
     | 
| 409 | 416 | 
    /*===========================================================================*/  | 
| modules/PowerManagement_1-1/module.h | ||
|---|---|---|
| 533 | 533 | 
    /* don't stop the serial driver so messages can still be printed */ \  | 
| 534 | 534 | 
    }  | 
| 535 | 535 | 
     | 
| 536 | 
    #define AMIROOS_CFG_SYSINFO_HOOK() {                                          \
   | 
|
| 537 | 
    _printSystemInfoLine(stream, "Built for Sensor Ring", SYSTEM_INFO_NAMEWIDTH, "%s", \  | 
|
| 538 | 
    (BOARD_SENSORRING == BOARD_NOSENSORRING) ? "none" : \  | 
|
| 539 | 
    (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) ? "ProximitySensor (VCNL4020)" : \  | 
|
| 540 | 
    (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) ? "DistanceSensor (VL53L0X)" : \  | 
|
| 541 | 
    (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) ? "DistanceSensor (VL53L1X)" : \  | 
|
| 542 | 
    "unknown"); \  | 
|
| 543 | 
    }  | 
|
| 544 | 
     | 
|
| 536 | 545 | 
    /** @} */  | 
| 537 | 546 | 
     | 
| 538 | 547 | 
    /*===========================================================================*/  | 
| modules/PowerManagement_1-2/module.h | ||
|---|---|---|
| 538 | 538 | 
    /* don't stop the serial driver so messages can still be printed */ \  | 
| 539 | 539 | 
    }  | 
| 540 | 540 | 
     | 
| 541 | 
    #define AMIROOS_CFG_SYSINFO_HOOK() {                                          \
   | 
|
| 542 | 
    _printSystemInfoLine(stream, "Built for Sensor Ring", SYSTEM_INFO_NAMEWIDTH, "%s", \  | 
|
| 543 | 
    (BOARD_SENSORRING == BOARD_NOSENSORRING) ? "none" : \  | 
|
| 544 | 
    (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) ? "ProximitySensor (VCNL4020)" : \  | 
|
| 545 | 
    (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) ? "DistanceSensor (VL53L0X)" : \  | 
|
| 546 | 
    (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X) ? "DistanceSensor (VL53L1X)" : \  | 
|
| 547 | 
    "unknown"); \  | 
|
| 548 | 
    switch_lld_state_t s; \  | 
|
| 549 | 
    switch_lld_get(&moduleLldBatterySwitch, &s); \  | 
|
| 550 | 
    _printSystemInfoLine(stream, "Battery Switch", SYSTEM_INFO_NAMEWIDTH, "%s", (s == SWITCH_LLD_STATE_ON) ? "on" : "off"); \  | 
|
| 551 | 
    }  | 
|
| 552 | 
     | 
|
| 541 | 553 | 
    /** @} */  | 
| 542 | 554 | 
     | 
| 543 | 555 | 
    /*===========================================================================*/  | 
Also available in: Unified diff