Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSG <who.just.the.doctor@gmail.com>2021-12-12 14:03:39 +0300
committerGitHub <noreply@github.com>2021-12-12 14:03:39 +0300
commit58ce937321cb259714fbdf38335df174d4c221ad (patch)
tree3d58f308b05552da2dbc50bbef9db013d58970ac /applications/ibutton/helpers
parent195f422bb9c2a1154b511536448d3104202e0e51 (diff)
[FL-1891] Release 0.42 bugfixes (#891)
* Fixed the "ibutton can only emulate after reading" bug * Fixed previous fix. FIXES FOR THE FIX GOD! BUGS FOR THE BUG THRONE! * Fixed "Repeat code" position on code input screen * Changed CAME protocol icon * Brewfile: add imagemagick missing assets compiler dependency * Correct fix for "Repeat code" position on code input screen Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Diffstat (limited to 'applications/ibutton/helpers')
-rw-r--r--applications/ibutton/helpers/key-emulator.cpp4
-rw-r--r--applications/ibutton/helpers/key-reader.cpp13
-rw-r--r--applications/ibutton/helpers/pulse-sequencer.cpp2
3 files changed, 13 insertions, 6 deletions
diff --git a/applications/ibutton/helpers/key-emulator.cpp b/applications/ibutton/helpers/key-emulator.cpp
index 7c8c5c97..a09d83e8 100644
--- a/applications/ibutton/helpers/key-emulator.cpp
+++ b/applications/ibutton/helpers/key-emulator.cpp
@@ -17,6 +17,9 @@ void KeyEmulator::start(iButtonKey* key) {
anything_emulated = false;
stop();
+ // pulldown pull pin, to prevent low-pass filtering by the RFID part of the schematic
+ furi_hal_rfid_pin_pull_pulldown();
+
switch(key->get_key_type()) {
case iButtonKeyType::KeyDallas:
start_dallas_emulate(key);
@@ -44,6 +47,7 @@ bool KeyEmulator::emulated() {
void KeyEmulator::stop() {
onewire_slave->stop();
pulser.stop();
+ furi_hal_rfid_pins_reset();
}
void KeyEmulator::start_cyfral_emulate(iButtonKey* key) {
diff --git a/applications/ibutton/helpers/key-reader.cpp b/applications/ibutton/helpers/key-reader.cpp
index fcb2a480..7abe5df7 100644
--- a/applications/ibutton/helpers/key-reader.cpp
+++ b/applications/ibutton/helpers/key-reader.cpp
@@ -115,12 +115,10 @@ bool KeyReader::verify_key(iButtonKeyType key_type, const uint8_t* const data, u
}
void KeyReader::start_comaparator(void) {
- // pulldown lf-rfid pins to prevent interference
- hal_gpio_init(&gpio_rfid_pull, GpioModeOutputOpenDrain, GpioPullNo, GpioSpeedLow);
- hal_gpio_write(&gpio_rfid_pull, false);
+ furi_hal_rfid_pins_reset();
- hal_gpio_init(&gpio_rfid_carrier_out, GpioModeOutputOpenDrain, GpioPullNo, GpioSpeedLow);
- hal_gpio_write(&gpio_rfid_carrier_out, false);
+ // pulldown pull pin, we sense the signal through the analog part of the RFID schematic
+ furi_hal_rfid_pin_pull_pulldown();
comparator_callback_pointer =
cbc::obtain_connector(this, &KeyReader::comparator_trigger_callback);
@@ -130,6 +128,11 @@ void KeyReader::start_comaparator(void) {
}
void KeyReader::stop_comaparator(void) {
+ furi_hal_rfid_pins_reset();
+
+ // rfid_pins_reset will disable ibutton pin
+ furi_hal_ibutton_start();
+
HAL_COMP_Stop(&hcomp1);
api_interrupt_remove(comparator_callback_pointer, InterruptTypeComparatorTrigger);
}
diff --git a/applications/ibutton/helpers/pulse-sequencer.cpp b/applications/ibutton/helpers/pulse-sequencer.cpp
index 328df7ac..9a8b0d98 100644
--- a/applications/ibutton/helpers/pulse-sequencer.cpp
+++ b/applications/ibutton/helpers/pulse-sequencer.cpp
@@ -56,7 +56,7 @@ void PulseSequencer::init_timer(uint32_t period) {
HAL_NVIC_EnableIRQ(TIM1_UP_TIM16_IRQn);
- hal_gpio_init(&ibutton_gpio, GpioModeOutputOpenDrain, GpioPullNo, GpioSpeedLow);
+ hal_gpio_init(&ibutton_gpio, GpioModeOutputOpenDrain, GpioPullNo, GpioSpeedVeryHigh);
}
void PulseSequencer::deinit_timer() {