[stm32] desig: high nibble to hex char first

When converting the uniqute id to a hex string, it seems more sensible to put the higher nibble in the string before the lower nibble.
This commit is contained in:
Felix Ruess 2015-01-16 19:12:17 +01:00
parent ca41131f97
commit f206fcb57e

View File

@ -45,8 +45,8 @@ void desig_get_unique_id_as_string(char *string,
2 * sizeof(device_id) : string_len - 1;
for (i = 0; i < len; i += 2) {
string[i] = chars[(device_id[i / 2] >> 0) & 0x0F];
string[i + 1] = chars[(device_id[i / 2] >> 4) & 0x0F];
string[i] = chars[(device_id[i / 2] >> 4) & 0x0F];
string[i + 1] = chars[(device_id[i / 2] >> 0) & 0x0F];
}
string[len] = '\0';