[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

@@ -1,4 +1,5 @@
#include <furi.h>
#include <api-hal.h>
void prepare_data(uint32_t ID, uint32_t VENDOR, uint8_t* data) {
uint8_t value[10];

View File

@@ -1,4 +1,5 @@
#include <furi.h>
#include <api-hal.h>
#include <gui/gui.h>
typedef enum { EventTypeTick, EventTypeKey, EventTypeRx } EventType;
@@ -213,9 +214,6 @@ int32_t lf_rfid_workaround(void* p) {
bool center = false;
size_t symbol_cnt = 0;
GpioPin* led_record = (GpioPin*)&led_gpio[1];
gpio_init(led_record, GpioModeOutputOpenDrain);
uint8_t buf[64];
for(size_t i = 0; i < 64; i++) {
buf[i] = 0;
@@ -272,9 +270,9 @@ int32_t lf_rfid_workaround(void* p) {
extract_data(&buf[9], &state->customer_id, &state->em_data);
printf("customer: %02d, data: %010lu\n", state->customer_id, state->em_data);
release_mutex(&state_mutex, state);
gpio_write(led_record, false);
api_hal_light_set(LightGreen, 0xFF);
osDelay(100);
gpio_write(led_record, true);
api_hal_light_set(LightGreen, 0x00);
}
symbol_cnt = 0;