Fix unPhone

This commit is contained in:
Ken Van Hoeylandt 2026-07-22 00:43:53 +02:00
parent ee9d75e9f0
commit e917dc6367

View File

@ -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);
}