From 55ef087fe7c16e810e7b8a0dbcf7b52ddfb8dc2c Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Wed, 9 Aug 2023 02:14:21 +0200 Subject: [PATCH] Fix magspoof power issues --- applications/external/magspoof/helpers/mag_helpers.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/applications/external/magspoof/helpers/mag_helpers.c b/applications/external/magspoof/helpers/mag_helpers.c index 89c451f62..1f7c2ae20 100644 --- a/applications/external/magspoof/helpers/mag_helpers.c +++ b/applications/external/magspoof/helpers/mag_helpers.c @@ -153,6 +153,7 @@ void tx_deinit_rfid() { furi_hal_gpio_write(RFID_PIN_OUT, 0); furi_hal_rfid_pins_reset(); + furi_hal_power_disable_otg(); } void tx_init_rf(int hz) { @@ -186,6 +187,7 @@ bool tx_init(MagSetting* setting) { tx_init_rfid(); break; case MagTxStateGPIO: + furi_hal_power_enable_otg(); // gpio_item_configure_all_pins(GpioModeOutputPushPull); furi_hal_gpio_init(GPIO_PIN_A, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow); furi_hal_gpio_init(GPIO_PIN_B, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow); @@ -236,6 +238,7 @@ bool tx_deinit(MagSetting* setting) { furi_hal_gpio_init(GPIO_PIN_ENABLE, GpioModeAnalog, GpioPullNo, GpioSpeedLow); //gpio_item_configure_all_pins(GpioModeAnalog); + furi_hal_power_disable_otg(); break; case MagTxStatePiezo: tx_deinit_piezo();