[apps/hwtest] Proper MCU_SERIAL command

Change-Id: I485bd67fa464a541a89d2c1c878b41a3328bed88
This commit is contained in:
Romain Goyet
2017-02-28 18:56:21 +01:00
parent eaeed82eea
commit b44bad3b92

View File

@@ -79,10 +79,11 @@ void command_ping(const char * input) {
}
void command_mcu_serial(const char * input) {
Ion::Console::writeLine("UNKNOWN");
char response[11+24+1] = {'M', 'C', 'U', '_', 'S', 'E', 'R', 'I', 'A', 'L', '=', 0};
strlcpy(response+11, Ion::serialNumber(), 25);
Ion::Console::writeLine(response);
}
static inline int8_t hexChar(char c) {
if (c >= '0' && c <= '9') {
return (c - '0');