[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>
This commit is contained in:
あく
2021-02-18 15:49:32 +03:00
committed by GitHub
parent da91482b7d
commit 68a3f6b4b7
214 changed files with 25577 additions and 184 deletions

View File

@@ -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);

View File

@@ -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() {