Add STM device resvision to MOTD.

This commit is contained in:
2021-10-15 22:06:30 +02:00
parent d9c145ec81
commit 4009a2794d
6 changed files with 25 additions and 7 deletions

View File

@@ -64,10 +64,13 @@ static shellmatta_retCode_t shell_cmd_ver(const shellmatta_handle_t handle,
uint32_t low_id;
uint32_t mid_id;
uint32_t high_id;
uint32_t stm_rev_id;
uint32_t stm_dev_id;
const char *hw_rev_str;
enum hw_revision pcb_rev;
unique_id_get(&high_id, &mid_id, &low_id);
stm_unique_id_get(&high_id, &mid_id, &low_id);
stm_dev_rev_id_get(&stm_dev_id, &stm_rev_id);
shellmatta_printf(handle, "Reflow Oven Controller Firmware " xstr(GIT_VER) "\r\n"
"Compiled: " __DATE__ " at " __TIME__ "\r\n");
@@ -85,7 +88,10 @@ static shellmatta_retCode_t shell_cmd_ver(const shellmatta_handle_t handle,
hw_rev_str = "Hardware: Unknown Revision. You might have to update the firmware!";
break;
}
shellmatta_printf(handle, "%s", hw_rev_str);
shellmatta_printf(handle, "%s\r\n", hw_rev_str);
shellmatta_printf(handle, "STM Device ID: 0x%04X\r\n", stm_dev_id);
shellmatta_printf(handle, "STM Revision ID: 0x%04X\r\n", stm_rev_id);
return SHELLMATTA_OK;
}