sync
This commit is contained in:
@@ -16,36 +16,9 @@
|
||||
|
||||
LOG_MODULE_REGISTER(main, LOG_LEVEL_INF);
|
||||
|
||||
void print_device_id(void) {
|
||||
uint8_t device_id[8]; // 64 Bit = 8 Bytes
|
||||
ssize_t length;
|
||||
|
||||
// Device ID auslesen
|
||||
length = hwinfo_get_device_id(device_id, sizeof(device_id));
|
||||
|
||||
if (length > 0) {
|
||||
char id_str[17]; // 16 Zeichen + Null-Terminator
|
||||
for (int i = 0; i < length; i++) {
|
||||
sprintf(&id_str[i * 2], "%02x", device_id[i]);
|
||||
}
|
||||
LOG_INF("Board Device ID: %s", id_str);
|
||||
} else {
|
||||
LOG_ERR("Konnte Device ID nicht lesen");
|
||||
}
|
||||
}
|
||||
|
||||
static int print_custom_banner(void)
|
||||
{
|
||||
printk("*** Edis Buzzer Version: " APP_VERSION_STRING " ***" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(print_custom_banner, PRE_KERNEL_1, 0);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
LOG_INF("Starting Edis Buzzer Application");
|
||||
print_device_id();
|
||||
LOG_INF("Starting Edi's Buzzer Application");
|
||||
|
||||
int rc;
|
||||
|
||||
@@ -75,4 +48,10 @@ int main(void)
|
||||
|
||||
LOG_INF("All subsystems initialized. Starting application threads.");
|
||||
audio_system_ready();
|
||||
k_sleep(K_SECONDS(5)); // Kurze Pause, damit die READY-Antworten der Subsysteme noch rausgehen
|
||||
volatile uint32_t *invalid_pointer = (volatile uint32_t *)0xFFFFFFFF;
|
||||
*invalid_pointer = 0xDEADBEEF;
|
||||
while (1) {
|
||||
k_sleep(K_FOREVER);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user