[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:
@@ -1,4 +1,5 @@
|
||||
#include <furi.h>
|
||||
#include <api-hal.h>
|
||||
#include <gui/gui.h>
|
||||
#include <input/input.h>
|
||||
|
||||
@@ -274,15 +275,6 @@ int32_t irda(void* p) {
|
||||
Gui* gui = furi_record_open("gui");
|
||||
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
|
||||
|
||||
// Red LED
|
||||
// TODO open record
|
||||
const GpioPin* red_led_record = &led_gpio[0];
|
||||
const GpioPin* green_led_record = &led_gpio[1];
|
||||
|
||||
// configure pin
|
||||
gpio_init(red_led_record, GpioModeOutputOpenDrain);
|
||||
gpio_init(green_led_record, GpioModeOutputOpenDrain);
|
||||
|
||||
// setup irda rx timer
|
||||
tim_irda_rx_init();
|
||||
|
||||
@@ -346,7 +338,7 @@ int32_t irda(void* p) {
|
||||
out.data_length = out_data_length;
|
||||
out.data = out_data;
|
||||
|
||||
gpio_write(red_led_record, event.value.rx.edge);
|
||||
api_hal_light_set(LightRed, event.value.rx.edge ? 0x00 : 0xFF);
|
||||
|
||||
bool decoded =
|
||||
process_decoder(decoder, event.value.rx.edge, &event.value.rx.lasted, 1, &out);
|
||||
@@ -378,8 +370,8 @@ int32_t irda(void* p) {
|
||||
view_port_update(view_port);
|
||||
|
||||
// blink anyway
|
||||
gpio_write(green_led_record, false);
|
||||
gpio_write(green_led_record, true);
|
||||
api_hal_light_set(LightGreen, 0xFF);
|
||||
api_hal_light_set(LightGreen, 0x00);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,6 @@
|
||||
#include <furi.h>
|
||||
#include <api-hal.h>
|
||||
|
||||
#include "irda_nec.h"
|
||||
#include "irda_protocols.h"
|
||||
|
||||
|
@@ -1,4 +1,6 @@
|
||||
#include <furi.h>
|
||||
#include <api-hal.h>
|
||||
|
||||
#include "irda_samsung.h"
|
||||
#include "irda_protocols.h"
|
||||
|
||||
|
Reference in New Issue
Block a user