From 4f038e4a41ca66c7e999b065c05173620c9bfcbc Mon Sep 17 00:00:00 2001 From: SG Date: Tue, 18 May 2021 23:11:48 +1000 Subject: [PATCH] [FL-1313] fix resistor heating on F5 target #467 --- applications/lf-rfid/helpers/rfid-timer-emulator.cpp | 5 ++--- applications/lf-rfid/helpers/rfid-timer-emulator.h | 1 - firmware/targets/f5/api-hal/api-hal-rfid.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/applications/lf-rfid/helpers/rfid-timer-emulator.cpp b/applications/lf-rfid/helpers/rfid-timer-emulator.cpp index cbe6a511..5cf1f07e 100644 --- a/applications/lf-rfid/helpers/rfid-timer-emulator.cpp +++ b/applications/lf-rfid/helpers/rfid-timer-emulator.cpp @@ -53,13 +53,12 @@ void RfidTimerEmulator::start(Type type) { void RfidTimerEmulator::stop() { api_hal_rfid_tim_emulate_stop(); + api_hal_rfid_tim_reset(); + api_hal_rfid_pins_reset(); api_interrupt_remove(timer_update_callback, InterruptTypeTimerUpdate); } -void RfidTimerEmulator::emulate() { -} - void RfidTimerEmulator::timer_update_callback(void* _hw, void* ctx) { RfidTimerEmulator* _this = static_cast(ctx); TIM_HandleTypeDef* hw = static_cast(_hw); diff --git a/applications/lf-rfid/helpers/rfid-timer-emulator.h b/applications/lf-rfid/helpers/rfid-timer-emulator.h index 40aad599..2fc93894 100644 --- a/applications/lf-rfid/helpers/rfid-timer-emulator.h +++ b/applications/lf-rfid/helpers/rfid-timer-emulator.h @@ -20,7 +20,6 @@ public: ~RfidTimerEmulator(); void start(Type type); void stop(); - void emulate(); private: EncoderGeneric* current_encoder = nullptr; diff --git a/firmware/targets/f5/api-hal/api-hal-rfid.c b/firmware/targets/f5/api-hal/api-hal-rfid.c index e2520992..ed8954a3 100644 --- a/firmware/targets/f5/api-hal/api-hal-rfid.c +++ b/firmware/targets/f5/api-hal/api-hal-rfid.c @@ -17,7 +17,7 @@ void api_hal_rfid_pins_reset() { // from both sides hal_gpio_init(&gpio_rfid_pull, GpioModeOutputPushPull, GpioSpeedLow, GpioPullNo); - hal_gpio_write(&gpio_rfid_pull, true); + hal_gpio_write(&gpio_rfid_pull, false); } void api_hal_rfid_pins_emulate() {