diff --git a/applications/cli/cli_commands.c b/applications/cli/cli_commands.c index 5f5a84947..101ff6eec 100644 --- a/applications/cli/cli_commands.c +++ b/applications/cli/cli_commands.c @@ -3,6 +3,7 @@ #include #include #include +#include void cli_command_help(Cli* cli, string_t args, void* context) { (void)args; @@ -90,6 +91,19 @@ void cli_command_log(Cli* cli, string_t args, void* context) { furi_stdglue_set_global_stdout_callback(NULL); } +void cli_command_hw_info(Cli* cli, string_t args, void* context) { + printf( + "%-20s %d.F%dB%dC%d\r\n", + "HW version:", + api_hal_version_get_hw_version(), + api_hal_version_get_hw_target(), + api_hal_version_get_hw_body(), + api_hal_version_get_hw_connect()); + time_t time = api_hal_version_get_hw_timestamp(); + printf("%-20s %s\r", "Production date:", ctime(&time)); + printf("%-20s %s", "Name:", api_hal_version_get_name_ptr()); +} + void cli_command_vibro(Cli* cli, string_t args, void* context) { if(!string_cmp(args, "0")) { api_hal_vibro_on(false); @@ -227,6 +241,7 @@ void cli_commands_init(Cli* cli) { cli_add_command(cli, "uid", cli_command_uuid, NULL); cli_add_command(cli, "date", cli_command_date, NULL); cli_add_command(cli, "log", cli_command_log, NULL); + cli_add_command(cli, "hw_info", cli_command_hw_info, NULL); cli_add_command(cli, "vibro", cli_command_vibro, NULL); cli_add_command(cli, "led", cli_command_led, NULL); cli_add_command(cli, "gpio_set", cli_command_gpio_set, NULL);