Skip to content

Commit e9a93c9

Browse files
committed
Remove leftover furi_hal_ibutton_(start_drive|stop|pin_low)
Replace the calls with the new furi_hal_onewire_xx equivalents Change request by @DrZlo13.
1 parent afc5a9d commit e9a93c9

File tree

3 files changed

+6
-33
lines changed

3 files changed

+6
-33
lines changed

firmware/targets/f7/furi_hal/furi_hal_ibutton.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,3 @@ void furi_hal_ibutton_emulate_stop() {
8989
furi_hal_ibutton->context = NULL;
9090
}
9191
}
92-
93-
void furi_hal_ibutton_start_drive() {
94-
furi_hal_onewire_start_drive(&ibutton_gpio);
95-
}
96-
97-
void furi_hal_ibutton_stop() {
98-
furi_hal_onewire_stop(&ibutton_gpio);
99-
}
100-
101-
void furi_hal_ibutton_pin_low() {
102-
furi_hal_onewire_pin_low(&ibutton_gpio);
103-
}

firmware/targets/f7/furi_hal/furi_hal_rfid.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <furi_hal_rfid.h>
2-
#include <furi_hal_ibutton.h>
32
#include <furi_hal_interrupt.h>
3+
#include <furi_hal_onewire.h>
44
#include <furi_hal_resources.h>
55
#include <furi.h>
66

@@ -69,7 +69,7 @@ void furi_hal_rfid_init() {
6969

7070
void furi_hal_rfid_pins_reset() {
7171
// ibutton bus disable
72-
furi_hal_ibutton_stop();
72+
furi_hal_onewire_stop(&ibutton_gpio);
7373

7474
// pulldown rfid antenna
7575
furi_hal_gpio_init(&gpio_rfid_carrier_out, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow);
@@ -86,8 +86,8 @@ void furi_hal_rfid_pins_reset() {
8686

8787
void furi_hal_rfid_pins_emulate() {
8888
// ibutton low
89-
furi_hal_ibutton_start_drive();
90-
furi_hal_ibutton_pin_low();
89+
furi_hal_onewire_start_drive(&ibutton_gpio);
90+
furi_hal_onewire_pin_low(&ibutton_gpio);
9191

9292
// pull pin to timer out
9393
furi_hal_gpio_init_ex(
@@ -107,8 +107,8 @@ void furi_hal_rfid_pins_emulate() {
107107

108108
void furi_hal_rfid_pins_read() {
109109
// ibutton low
110-
furi_hal_ibutton_start_drive();
111-
furi_hal_ibutton_pin_low();
110+
furi_hal_onewire_start_drive(&ibutton_gpio);
111+
furi_hal_onewire_pin_low(&ibutton_gpio);
112112

113113
// dont pull rfid antenna
114114
furi_hal_gpio_init(&gpio_nfc_irq_rfid_pull, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow);

firmware/targets/furi_hal_include/furi_hal_ibutton.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,6 @@ void furi_hal_ibutton_emulate_set_next(uint32_t period);
2727

2828
void furi_hal_ibutton_emulate_stop();
2929

30-
/**
31-
* Sets the pin to normal mode (open collector), and sets it to float
32-
*/
33-
void furi_hal_ibutton_start_drive();
34-
35-
/**
36-
* Sets the pin to analog mode, and sets it to float
37-
*/
38-
void furi_hal_ibutton_stop();
39-
40-
/**
41-
* Sets the pin to low
42-
*/
43-
void furi_hal_ibutton_pin_low();
44-
4530
#ifdef __cplusplus
4631
}
4732
#endif

0 commit comments

Comments
 (0)