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:
authorあく <alleteam@gmail.com>2021-02-18 15:49:32 +0300
committerGitHub <noreply@github.com>2021-02-18 15:49:32 +0300
commit68a3f6b4b76e7e04c28c738f575f5ada29375b36 (patch)
treeb98fd92e78a10b6b94376a862aeb366186067205 /applications/ibutton
parentda91482b7df06f67fb07352e0fdcbde04e7909e4 (diff)
[FL-873] Add F5 target, lp5562 driver and api-hal-light (#347)
* Add F5 target, lp5562 driver and api-hal-light. Update api-usage, switch to F5 by default. * API HAL: add i2c and hardware version api. Dolphin: show hardware version. * OTP version generator and flashing utility. * Assets script: fix code formatting * Backport F5 changes to F4 * F4: disable insomnia, prevent damage to BLE RX path * F5 HAL API Light: remove magic delay to fix magic BLE * Dolphin: HW target validation on start * invert RSSI indication in sub-1 * API HAL: rename board to body in version api * Gpio tester: detach and release viewport on exit Co-authored-by: aanper <mail@s3f.ru>
Diffstat (limited to 'applications/ibutton')
-rw-r--r--applications/ibutton/blanks_writer.cpp1
-rw-r--r--applications/ibutton/ibutton.cpp16
2 files changed, 5 insertions, 12 deletions
diff --git a/applications/ibutton/blanks_writer.cpp b/applications/ibutton/blanks_writer.cpp
index 9e5976fe..fb971793 100644
--- a/applications/ibutton/blanks_writer.cpp
+++ b/applications/ibutton/blanks_writer.cpp
@@ -40,6 +40,7 @@ public:
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
+#include <api-hal.h>
void BlanksWriter::onewire_release(void) {
gpio_write(gpio, true);
diff --git a/applications/ibutton/ibutton.cpp b/applications/ibutton/ibutton.cpp
index ca82444b..7d6a2c8b 100644
--- a/applications/ibutton/ibutton.cpp
+++ b/applications/ibutton/ibutton.cpp
@@ -15,14 +15,6 @@ void AppiButton::run() {
switch_to_mode(0);
- // TODO open record
- red_led_record = &led_gpio[0];
- green_led_record = &led_gpio[1];
-
- // configure pin
- gpio_init(red_led_record, GpioModeOutputOpenDrain);
- gpio_init(green_led_record, GpioModeOutputOpenDrain);
-
api_hal_power_insomnia_enter();
app_ready();
@@ -112,15 +104,15 @@ void AppiButton::render_cyfral_list(Canvas* canvas, AppiButtonState* state) {
}
void AppiButton::blink_red() {
- gpio_write(red_led_record, 0);
+ api_hal_light_set(LightRed, 0xFF);
delay(10);
- gpio_write(red_led_record, 1);
+ api_hal_light_set(LightRed, 0x00);
}
void AppiButton::blink_green() {
- gpio_write(green_led_record, 0);
+ api_hal_light_set(LightGreen, 0xFF);
delay(10);
- gpio_write(green_led_record, 1);
+ api_hal_light_set(LightGreen, 0x00);
}
void AppiButton::increase_mode() {