HAL LFRFID: fix resistor heating on f5 target (#470)

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
SG 2021-05-18 23:51:14 +10:00 committed by GitHub
parent 9adabd7a94
commit a02aa42095
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 9 deletions

View File

@ -53,10 +53,10 @@ void RfidTimerEmulator::start(Type type) {
void RfidTimerEmulator::stop() { void RfidTimerEmulator::stop() {
api_hal_rfid_tim_emulate_stop(); api_hal_rfid_tim_emulate_stop();
api_interrupt_remove(timer_update_callback, InterruptTypeTimerUpdate);
api_hal_rfid_tim_reset(); api_hal_rfid_tim_reset();
api_hal_rfid_pins_reset(); api_hal_rfid_pins_reset();
api_interrupt_remove(timer_update_callback, InterruptTypeTimerUpdate);
} }
void RfidTimerEmulator::timer_update_callback(void* _hw, void* ctx) { void RfidTimerEmulator::timer_update_callback(void* _hw, void* ctx) {

View File

@ -11,13 +11,9 @@ void api_hal_rfid_pins_reset() {
// ibutton bus disable // ibutton bus disable
api_hal_ibutton_stop(); api_hal_ibutton_stop();
// pulldown rfid antenna // rfid pins disable
hal_gpio_init(&gpio_rfid_carrier_out, GpioModeOutputPushPull, GpioSpeedLow, GpioPullNo); hal_gpio_init(&gpio_rfid_carrier_out, GpioModeAnalog, GpioSpeedLow, GpioPullNo);
hal_gpio_write(&gpio_rfid_carrier_out, true); hal_gpio_init(&gpio_rfid_pull, GpioModeAnalog, GpioSpeedLow, GpioPullNo);
// from both sides
hal_gpio_init(&gpio_rfid_pull, GpioModeOutputPushPull, GpioSpeedLow, GpioPullNo);
hal_gpio_write(&gpio_rfid_pull, false);
} }
void api_hal_rfid_pins_emulate() { void api_hal_rfid_pins_emulate() {