Stand vor Protokollumbau
This commit is contained in:
@@ -50,4 +50,16 @@ uint8_t get_reboot_status(void)
|
||||
printk("Reboot status detected: 0x%02x\n", status);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
int hex2int(char c) {
|
||||
if (c >= '0' && c <= '9') return c - '0';
|
||||
if (c >= 'a' && c <= 'f') return c - 'a' + 10;
|
||||
if (c >= 'A' && c <= 'F') return c - 'A' + 10;
|
||||
return -1; // Fehlerhaftes Zeichen
|
||||
}
|
||||
|
||||
char int2hex(uint8_t i) {
|
||||
if (i < 10) return '0' + i;
|
||||
return 'a' + (i - 10);
|
||||
}
|
||||
Reference in New Issue
Block a user