16 static const char *paths[] = {
"/etc/machine-id",
"/var/lib/dbus/machine-id" };
17 for (
unsigned int p = 0;
p <
sizeof(paths) /
sizeof(paths[0]);
p++) {
19 FILE *
f = fopen(paths[
p],
"r");
23 char *ok = fgets(line,
sizeof(line),
f);
25 if (ok == NULL || strspn(line,
"0123456789abcdef") != 32) {
29 for (
uint8_t i = 0; i < len; i++) {
31 sscanf(&line[2 * i],
"%2x", &
b);
void mcu_arch_init(void)
Initialize the specific archittecture functions.
uint8_t mcu_get_uid(uint8_t *uid, uint8_t max_len)
Get the 96-bit unique device ID of the STM32.
Arch independent mcu ( Micro Controller Unit ) utilities.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
uint16_t f
Camera baseline, in meters (i.e. horizontal distance between the two cameras of the stereo setup).