From 2cd21f7dd2109eaf5a5dc146329b869cfc0bbc4c Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Thu, 29 Jan 2026 16:11:12 +0100 Subject: [PATCH] Add weak init callback. Signed-off-by: Pol Henarejos --- src/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.c b/src/main.c index 99185c1..064e622 100644 --- a/src/main.c +++ b/src/main.c @@ -235,6 +235,11 @@ bool wait_button() { req_button_pending = false; return timeout || cancel_button; } + +__attribute__((weak)) int picokey_init() { + return 0; +} + #endif bool set_rtc = false; @@ -393,6 +398,10 @@ int main(void) { #endif #endif +#ifndef ENABLE_EMULATION + picokey_init(); +#endif + #ifdef ESP_PLATFORM xTaskCreatePinnedToCore(core0_loop, "core0", 4096*ITF_TOTAL*2, NULL, CONFIG_TINYUSB_TASK_PRIORITY - 1, &hcore0, ESP32_CORE0); #else