From e917dc6367ba4655a932e84961e49dbec8b66b73 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Wed, 22 Jul 2026 00:43:53 +0200 Subject: [PATCH] Fix unPhone --- Devices/unphone/source/drivers/unphone_nav_buttons.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Devices/unphone/source/drivers/unphone_nav_buttons.cpp b/Devices/unphone/source/drivers/unphone_nav_buttons.cpp index 76ff9fcc9..7e3eefeab 100644 --- a/Devices/unphone/source/drivers/unphone_nav_buttons.cpp +++ b/Devices/unphone/source/drivers/unphone_nav_buttons.cpp @@ -101,9 +101,8 @@ static error_t acquire_button(const GpioPinSpec& pin, void (*callback)(void*), v return ERROR_RESOURCE; } - if (error == ERROR_NONE) { - error = gpio_descriptor_add_callback(descriptor, callback, arg); - } + auto error = gpio_descriptor_add_callback(descriptor, callback, arg); + if (error == ERROR_NONE) { error = gpio_descriptor_enable_interrupt(descriptor); }