[FL-2733] multitarget support for fbt (#2209)
* First part of multitarget porting * Delete firmware/targets/f7/Inc directory * Delete firmware/targets/f7/Src directory * gpio: cli fixes; about: using version from HAL * sdk: path fixes * gui: include fixes * applications: more include fixes * gpio: ported to new apis * hal: introduced furi_hal_target_hw.h; libs: added one_wire * hal: f18 target * github: also build f18 by default * typo fix * fbt: removed extra checks on app list * api: explicitly bundling select mlib headers with sdk * hal: f18: changed INPUT_DEBOUNCE_TICKS to match f7 * cleaned up commented out code * docs: added info on hw targets * docs: targets: formatting fixes * f18: fixed link error * f18: fixed API version to match f7 * docs: hardware: minor wording fixes * faploader: added fw target check * docs: typo fixes * github: not building komi target by default * fbt: support for `targets` field for built-in apps * github: reworked build flow to exclude app_set; fbt: removed komi-specific appset; added additional target buildset check * github: fixed build; nfc: fixed pvs warnings * attempt to fix target id * f7, f18: removed certain HAL function from public API * apps: debug: enabled bt_debug_app for f18 * Targets: backport input pins configuration routine from F7 to F18 Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -2,6 +2,7 @@ App(
|
||||
appid="accessor",
|
||||
name="Accessor",
|
||||
apptype=FlipperAppType.DEBUG,
|
||||
targets=["f7"],
|
||||
entry_point="accessor_app",
|
||||
cdefines=["APP_ACCESSOR"],
|
||||
requires=["gui"],
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "bt_carrier_test.h"
|
||||
#include "bt_test.h"
|
||||
#include "bt_test_types.h"
|
||||
#include "furi_hal_bt.h"
|
||||
#include <furi_hal_bt.h>
|
||||
|
||||
struct BtCarrierTest {
|
||||
BtTest* bt_test;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "bt_packet_test.h"
|
||||
#include "bt_test.h"
|
||||
#include "bt_test_types.h"
|
||||
#include "furi_hal_bt.h"
|
||||
#include <furi_hal_bt.h>
|
||||
|
||||
struct BtPacketTest {
|
||||
BtTest* bt_test;
|
||||
|
@@ -1,10 +1,11 @@
|
||||
#include <file_browser_test_icons.h>
|
||||
#include "file_browser_app_i.h"
|
||||
#include "gui/modules/file_browser.h"
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
#include <file_browser_test_icons.h>
|
||||
|
||||
#include <gui/modules/file_browser.h>
|
||||
#include <storage/storage.h>
|
||||
#include <lib/toolbox/path.h>
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
|
||||
static bool file_browser_app_custom_event_callback(void* context, uint32_t event) {
|
||||
furi_assert(context);
|
||||
|
@@ -2,6 +2,7 @@ App(
|
||||
appid="lfrfid_debug",
|
||||
name="LF-RFID Debug",
|
||||
apptype=FlipperAppType.DEBUG,
|
||||
targets=["f7"],
|
||||
entry_point="lfrfid_debug_app",
|
||||
requires=[
|
||||
"gui",
|
||||
|
@@ -1,10 +1,11 @@
|
||||
#include <archive/views/archive_browser_view.h>
|
||||
#include "archive_files.h"
|
||||
#include "archive_apps.h"
|
||||
#include "archive_browser.h"
|
||||
#include "../views/archive_browser_view.h"
|
||||
|
||||
#include <core/common_defines.h>
|
||||
#include <core/log.h>
|
||||
#include "gui/modules/file_browser_worker.h"
|
||||
#include <gui/modules/file_browser_worker.h>
|
||||
#include <fap_loader/fap_loader_app.h>
|
||||
#include <math.h>
|
||||
|
||||
|
@@ -1,14 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "../helpers/archive_files.h"
|
||||
#include "../helpers/archive_favorites.h"
|
||||
|
||||
#include <gui/gui_i.h>
|
||||
#include <gui/view.h>
|
||||
#include <gui/canvas.h>
|
||||
#include <gui/elements.h>
|
||||
#include <furi.h>
|
||||
#include <gui/modules/file_browser_worker.h>
|
||||
#include <storage/storage.h>
|
||||
#include "../helpers/archive_files.h"
|
||||
#include "../helpers/archive_favorites.h"
|
||||
#include "gui/modules/file_browser_worker.h"
|
||||
#include <furi.h>
|
||||
|
||||
#define MAX_LEN_PX 110
|
||||
#define MAX_NAME_LEN 255
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "../bad_usb_app_i.h"
|
||||
#include "furi_hal_power.h"
|
||||
#include "furi_hal_usb.h"
|
||||
#include <furi_hal_power.h>
|
||||
#include <furi_hal_usb.h>
|
||||
#include <storage/storage.h>
|
||||
|
||||
static bool bad_usb_file_select(BadUsbApp* bad_usb) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "../bad_usb_script.h"
|
||||
#include "../bad_usb_app_i.h"
|
||||
#include "../views/bad_usb_view.h"
|
||||
#include "furi_hal.h"
|
||||
#include <furi_hal.h>
|
||||
#include "toolbox/path.h"
|
||||
|
||||
void bad_usb_scene_work_ok_callback(InputType type, void* context) {
|
||||
|
@@ -25,6 +25,7 @@ GpioApp* gpio_app_alloc() {
|
||||
GpioApp* app = malloc(sizeof(GpioApp));
|
||||
|
||||
app->gui = furi_record_open(RECORD_GUI);
|
||||
app->gpio_items = gpio_items_alloc();
|
||||
|
||||
app->view_dispatcher = view_dispatcher_alloc();
|
||||
app->scene_manager = scene_manager_alloc(&gpio_scene_handlers, app);
|
||||
@@ -47,7 +48,7 @@ GpioApp* gpio_app_alloc() {
|
||||
app->view_dispatcher,
|
||||
GpioAppViewVarItemList,
|
||||
variable_item_list_get_view(app->var_item_list));
|
||||
app->gpio_test = gpio_test_alloc();
|
||||
app->gpio_test = gpio_test_alloc(app->gpio_items);
|
||||
view_dispatcher_add_view(
|
||||
app->view_dispatcher, GpioAppViewGpioTest, gpio_test_get_view(app->gpio_test));
|
||||
|
||||
@@ -91,6 +92,7 @@ void gpio_app_free(GpioApp* app) {
|
||||
furi_record_close(RECORD_GUI);
|
||||
furi_record_close(RECORD_NOTIFICATION);
|
||||
|
||||
gpio_items_free(app->gpio_items);
|
||||
free(app);
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "gpio_app.h"
|
||||
#include "gpio_item.h"
|
||||
#include "gpio_items.h"
|
||||
#include "scenes/gpio_scene.h"
|
||||
#include "gpio_custom_event.h"
|
||||
#include "usb_uart_bridge.h"
|
||||
@@ -28,6 +28,7 @@ struct GpioApp {
|
||||
VariableItem* var_item_flow;
|
||||
GpioTest* gpio_test;
|
||||
GpioUsbUart* gpio_usb_uart;
|
||||
GPIOItems* gpio_items;
|
||||
UsbUartBridge* usb_uart_bridge;
|
||||
UsbUartConfig* usb_uart_cfg;
|
||||
};
|
||||
|
@@ -1,51 +0,0 @@
|
||||
#include "gpio_item.h"
|
||||
|
||||
#include <furi_hal_resources.h>
|
||||
|
||||
typedef struct {
|
||||
const char* name;
|
||||
const GpioPin* pin;
|
||||
} GpioItem;
|
||||
|
||||
static const GpioItem gpio_item[GPIO_ITEM_COUNT] = {
|
||||
{"1.2: PA7", &gpio_ext_pa7},
|
||||
{"1.3: PA6", &gpio_ext_pa6},
|
||||
{"1.4: PA4", &gpio_ext_pa4},
|
||||
{"1.5: PB3", &gpio_ext_pb3},
|
||||
{"1.6: PB2", &gpio_ext_pb2},
|
||||
{"1.7: PC3", &gpio_ext_pc3},
|
||||
{"2.7: PC1", &gpio_ext_pc1},
|
||||
{"2.8: PC0", &gpio_ext_pc0},
|
||||
};
|
||||
|
||||
void gpio_item_configure_pin(uint8_t index, GpioMode mode) {
|
||||
furi_assert(index < GPIO_ITEM_COUNT);
|
||||
furi_hal_gpio_write(gpio_item[index].pin, false);
|
||||
furi_hal_gpio_init(gpio_item[index].pin, mode, GpioPullNo, GpioSpeedVeryHigh);
|
||||
}
|
||||
|
||||
void gpio_item_configure_all_pins(GpioMode mode) {
|
||||
for(uint8_t i = 0; i < GPIO_ITEM_COUNT; i++) {
|
||||
gpio_item_configure_pin(i, mode);
|
||||
}
|
||||
}
|
||||
|
||||
void gpio_item_set_pin(uint8_t index, bool level) {
|
||||
furi_assert(index < GPIO_ITEM_COUNT);
|
||||
furi_hal_gpio_write(gpio_item[index].pin, level);
|
||||
}
|
||||
|
||||
void gpio_item_set_all_pins(bool level) {
|
||||
for(uint8_t i = 0; i < GPIO_ITEM_COUNT; i++) {
|
||||
gpio_item_set_pin(i, level);
|
||||
}
|
||||
}
|
||||
|
||||
const char* gpio_item_get_pin_name(uint8_t index) {
|
||||
furi_assert(index < GPIO_ITEM_COUNT + 1);
|
||||
if(index == GPIO_ITEM_COUNT) {
|
||||
return "ALL";
|
||||
} else {
|
||||
return gpio_item[index].name;
|
||||
}
|
||||
}
|
@@ -1,15 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <furi_hal_gpio.h>
|
||||
|
||||
#define GPIO_ITEM_COUNT 8
|
||||
|
||||
void gpio_item_configure_pin(uint8_t index, GpioMode mode);
|
||||
|
||||
void gpio_item_configure_all_pins(GpioMode mode);
|
||||
|
||||
void gpio_item_set_pin(uint8_t index, bool level);
|
||||
|
||||
void gpio_item_set_all_pins(bool level);
|
||||
|
||||
const char* gpio_item_get_pin_name(uint8_t index);
|
69
applications/main/gpio/gpio_items.c
Normal file
69
applications/main/gpio/gpio_items.c
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "gpio_items.h"
|
||||
|
||||
#include <furi_hal_resources.h>
|
||||
|
||||
struct GPIOItems {
|
||||
GpioPinRecord* pins;
|
||||
size_t count;
|
||||
};
|
||||
|
||||
GPIOItems* gpio_items_alloc() {
|
||||
GPIOItems* items = malloc(sizeof(GPIOItems));
|
||||
|
||||
items->count = 0;
|
||||
for(size_t i = 0; i < gpio_pins_count; i++) {
|
||||
if(!gpio_pins[i].debug) {
|
||||
items->count++;
|
||||
}
|
||||
}
|
||||
|
||||
items->pins = malloc(sizeof(GpioPinRecord) * items->count);
|
||||
for(size_t i = 0; i < items->count; i++) {
|
||||
if(!gpio_pins[i].debug) {
|
||||
items->pins[i].pin = gpio_pins[i].pin;
|
||||
items->pins[i].name = gpio_pins[i].name;
|
||||
}
|
||||
}
|
||||
return items;
|
||||
}
|
||||
|
||||
void gpio_items_free(GPIOItems* items) {
|
||||
free(items->pins);
|
||||
free(items);
|
||||
}
|
||||
|
||||
uint8_t gpio_items_get_count(GPIOItems* items) {
|
||||
return items->count;
|
||||
}
|
||||
|
||||
void gpio_items_configure_pin(GPIOItems* items, uint8_t index, GpioMode mode) {
|
||||
furi_assert(index < items->count);
|
||||
furi_hal_gpio_write(items->pins[index].pin, false);
|
||||
furi_hal_gpio_init(items->pins[index].pin, mode, GpioPullNo, GpioSpeedVeryHigh);
|
||||
}
|
||||
|
||||
void gpio_items_configure_all_pins(GPIOItems* items, GpioMode mode) {
|
||||
for(uint8_t i = 0; i < items->count; i++) {
|
||||
gpio_items_configure_pin(items, i, mode);
|
||||
}
|
||||
}
|
||||
|
||||
void gpio_items_set_pin(GPIOItems* items, uint8_t index, bool level) {
|
||||
furi_assert(index < items->count);
|
||||
furi_hal_gpio_write(items->pins[index].pin, level);
|
||||
}
|
||||
|
||||
void gpio_items_set_all_pins(GPIOItems* items, bool level) {
|
||||
for(uint8_t i = 0; i < items->count; i++) {
|
||||
gpio_items_set_pin(items, i, level);
|
||||
}
|
||||
}
|
||||
|
||||
const char* gpio_items_get_pin_name(GPIOItems* items, uint8_t index) {
|
||||
furi_assert(index < items->count + 1);
|
||||
if(index == items->count) {
|
||||
return "ALL";
|
||||
} else {
|
||||
return items->pins[index].name;
|
||||
}
|
||||
}
|
29
applications/main/gpio/gpio_items.h
Normal file
29
applications/main/gpio/gpio_items.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include <furi_hal_gpio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct GPIOItems GPIOItems;
|
||||
|
||||
GPIOItems* gpio_items_alloc();
|
||||
|
||||
void gpio_items_free(GPIOItems* items);
|
||||
|
||||
uint8_t gpio_items_get_count(GPIOItems* items);
|
||||
|
||||
void gpio_items_configure_pin(GPIOItems* items, uint8_t index, GpioMode mode);
|
||||
|
||||
void gpio_items_configure_all_pins(GPIOItems* items, GpioMode mode);
|
||||
|
||||
void gpio_items_set_pin(GPIOItems* items, uint8_t index, bool level);
|
||||
|
||||
void gpio_items_set_all_pins(GPIOItems* items, bool level);
|
||||
|
||||
const char* gpio_items_get_pin_name(GPIOItems* items, uint8_t index);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@@ -1,6 +1,6 @@
|
||||
#include "../gpio_app_i.h"
|
||||
#include "furi_hal_power.h"
|
||||
#include "furi_hal_usb.h"
|
||||
#include <furi_hal_power.h>
|
||||
#include <furi_hal_usb.h>
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
enum GpioItem {
|
||||
|
@@ -12,8 +12,9 @@ void gpio_scene_test_ok_callback(InputType type, void* context) {
|
||||
}
|
||||
|
||||
void gpio_scene_test_on_enter(void* context) {
|
||||
furi_assert(context);
|
||||
GpioApp* app = context;
|
||||
gpio_item_configure_all_pins(GpioModeOutputPushPull);
|
||||
gpio_items_configure_all_pins(app->gpio_items, GpioModeOutputPushPull);
|
||||
gpio_test_set_ok_callback(app->gpio_test, gpio_scene_test_ok_callback, app);
|
||||
view_dispatcher_switch_to_view(app->view_dispatcher, GpioAppViewGpioTest);
|
||||
}
|
||||
@@ -25,6 +26,7 @@ bool gpio_scene_test_on_event(void* context, SceneManagerEvent event) {
|
||||
}
|
||||
|
||||
void gpio_scene_test_on_exit(void* context) {
|
||||
UNUSED(context);
|
||||
gpio_item_configure_all_pins(GpioModeAnalog);
|
||||
furi_assert(context);
|
||||
GpioApp* app = context;
|
||||
gpio_items_configure_all_pins(app->gpio_items, GpioModeAnalog);
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "../usb_uart_bridge.h"
|
||||
#include "../gpio_app_i.h"
|
||||
#include "furi_hal.h"
|
||||
#include <furi_hal.h>
|
||||
|
||||
typedef enum {
|
||||
UsbUartLineIndexVcp,
|
||||
|
@@ -1,10 +1,10 @@
|
||||
#include "usb_uart_bridge.h"
|
||||
#include "furi_hal.h"
|
||||
#include <furi_hal_usb_cdc.h>
|
||||
#include "usb_cdc.h"
|
||||
#include "cli/cli_vcp.h"
|
||||
#include <cli/cli_vcp.h>
|
||||
#include <cli/cli.h>
|
||||
#include <toolbox/api_lock.h>
|
||||
#include "cli/cli.h"
|
||||
#include <furi_hal.h>
|
||||
#include <furi_hal_usb_cdc.h>
|
||||
|
||||
#define USB_CDC_PKT_LEN CDC_DATA_SZ
|
||||
#define USB_UART_RX_BUF_SIZE (USB_CDC_PKT_LEN * 5)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "gpio_test.h"
|
||||
#include "../gpio_item.h"
|
||||
#include "../gpio_items.h"
|
||||
|
||||
#include <gui/elements.h>
|
||||
|
||||
@@ -11,6 +11,7 @@ struct GpioTest {
|
||||
|
||||
typedef struct {
|
||||
uint8_t pin_idx;
|
||||
GPIOItems* gpio_items;
|
||||
} GpioTestModel;
|
||||
|
||||
static bool gpio_test_process_left(GpioTest* gpio_test);
|
||||
@@ -25,7 +26,12 @@ static void gpio_test_draw_callback(Canvas* canvas, void* _model) {
|
||||
elements_multiline_text_aligned(
|
||||
canvas, 64, 16, AlignCenter, AlignTop, "Press < or > to change pin");
|
||||
elements_multiline_text_aligned(
|
||||
canvas, 64, 32, AlignCenter, AlignTop, gpio_item_get_pin_name(model->pin_idx));
|
||||
canvas,
|
||||
64,
|
||||
32,
|
||||
AlignCenter,
|
||||
AlignTop,
|
||||
gpio_items_get_pin_name(model->gpio_items, model->pin_idx));
|
||||
}
|
||||
|
||||
static bool gpio_test_input_callback(InputEvent* event, void* context) {
|
||||
@@ -64,7 +70,7 @@ static bool gpio_test_process_right(GpioTest* gpio_test) {
|
||||
gpio_test->view,
|
||||
GpioTestModel * model,
|
||||
{
|
||||
if(model->pin_idx < GPIO_ITEM_COUNT) {
|
||||
if(model->pin_idx < gpio_items_get_count(model->gpio_items)) {
|
||||
model->pin_idx++;
|
||||
}
|
||||
},
|
||||
@@ -80,17 +86,17 @@ static bool gpio_test_process_ok(GpioTest* gpio_test, InputEvent* event) {
|
||||
GpioTestModel * model,
|
||||
{
|
||||
if(event->type == InputTypePress) {
|
||||
if(model->pin_idx < GPIO_ITEM_COUNT) {
|
||||
gpio_item_set_pin(model->pin_idx, true);
|
||||
if(model->pin_idx < gpio_items_get_count(model->gpio_items)) {
|
||||
gpio_items_set_pin(model->gpio_items, model->pin_idx, true);
|
||||
} else {
|
||||
gpio_item_set_all_pins(true);
|
||||
gpio_items_set_all_pins(model->gpio_items, true);
|
||||
}
|
||||
consumed = true;
|
||||
} else if(event->type == InputTypeRelease) {
|
||||
if(model->pin_idx < GPIO_ITEM_COUNT) {
|
||||
gpio_item_set_pin(model->pin_idx, false);
|
||||
if(model->pin_idx < gpio_items_get_count(model->gpio_items)) {
|
||||
gpio_items_set_pin(model->gpio_items, model->pin_idx, false);
|
||||
} else {
|
||||
gpio_item_set_all_pins(false);
|
||||
gpio_items_set_all_pins(model->gpio_items, false);
|
||||
}
|
||||
consumed = true;
|
||||
}
|
||||
@@ -101,11 +107,15 @@ static bool gpio_test_process_ok(GpioTest* gpio_test, InputEvent* event) {
|
||||
return consumed;
|
||||
}
|
||||
|
||||
GpioTest* gpio_test_alloc() {
|
||||
GpioTest* gpio_test_alloc(GPIOItems* gpio_items) {
|
||||
GpioTest* gpio_test = malloc(sizeof(GpioTest));
|
||||
|
||||
gpio_test->view = view_alloc();
|
||||
view_allocate_model(gpio_test->view, ViewModelTypeLocking, sizeof(GpioTestModel));
|
||||
|
||||
with_view_model(
|
||||
gpio_test->view, GpioTestModel * model, { model->gpio_items = gpio_items; }, false);
|
||||
|
||||
view_set_context(gpio_test->view, gpio_test);
|
||||
view_set_draw_callback(gpio_test->view, gpio_test_draw_callback);
|
||||
view_set_input_callback(gpio_test->view, gpio_test_input_callback);
|
||||
|
@@ -1,11 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "../gpio_items.h"
|
||||
|
||||
#include <gui/view.h>
|
||||
|
||||
typedef struct GpioTest GpioTest;
|
||||
typedef void (*GpioTestOkCallback)(InputType type, void* context);
|
||||
|
||||
GpioTest* gpio_test_alloc();
|
||||
GpioTest* gpio_test_alloc(GPIOItems* gpio_items);
|
||||
|
||||
void gpio_test_free(GpioTest* gpio_test);
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "../usb_uart_bridge.h"
|
||||
#include "../gpio_app_i.h"
|
||||
#include "furi_hal.h"
|
||||
#include <furi_hal.h>
|
||||
#include <gui/elements.h>
|
||||
|
||||
struct GpioUsbUart {
|
||||
|
@@ -2,6 +2,7 @@ App(
|
||||
appid="ibutton",
|
||||
name="iButton",
|
||||
apptype=FlipperAppType.APP,
|
||||
targets=["f7"],
|
||||
entry_point="ibutton_app",
|
||||
cdefines=["APP_IBUTTON"],
|
||||
requires=[
|
||||
|
@@ -3,6 +3,7 @@ App(
|
||||
name="Infrared",
|
||||
apptype=FlipperAppType.APP,
|
||||
entry_point="infrared_app",
|
||||
targets=["f7"],
|
||||
cdefines=["APP_INFRARED"],
|
||||
requires=[
|
||||
"gui",
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "../infrared_i.h"
|
||||
#include "gui/canvas.h"
|
||||
#include <gui/canvas.h>
|
||||
|
||||
typedef enum {
|
||||
InfraredRpcStateIdle,
|
||||
|
@@ -1,11 +1,11 @@
|
||||
#include "infrared_debug_view.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <gui/canvas.h>
|
||||
#include <gui/elements.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define INFRARED_DEBUG_TEXT_LENGTH 64
|
||||
|
||||
struct InfraredDebugView {
|
||||
|
@@ -1,13 +1,15 @@
|
||||
#include <core/check.h>
|
||||
#include "furi_hal_resources.h"
|
||||
#include "assets_icons.h"
|
||||
#include "gui/canvas.h"
|
||||
#include "gui/view.h"
|
||||
#include "input/input.h"
|
||||
#include <gui/elements.h>
|
||||
#include <furi.h>
|
||||
#include "infrared_progress_view.h"
|
||||
#include "gui/modules/button_panel.h"
|
||||
|
||||
#include <assets_icons.h>
|
||||
#include <gui/canvas.h>
|
||||
#include <gui/view.h>
|
||||
#include <gui/elements.h>
|
||||
#include <gui/modules/button_panel.h>
|
||||
#include <input/input.h>
|
||||
|
||||
#include <furi.h>
|
||||
#include <furi_hal_resources.h>
|
||||
#include <core/check.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct InfraredProgressView {
|
||||
|
@@ -2,6 +2,7 @@ App(
|
||||
appid="lfrfid",
|
||||
name="125 kHz RFID",
|
||||
apptype=FlipperAppType.APP,
|
||||
targets=["f7"],
|
||||
entry_point="lfrfid_app",
|
||||
cdefines=["APP_LF_RFID"],
|
||||
requires=[
|
||||
|
@@ -2,6 +2,7 @@ App(
|
||||
appid="nfc",
|
||||
name="NFC",
|
||||
apptype=FlipperAppType.APP,
|
||||
targets=["f7"],
|
||||
entry_point="nfc_app",
|
||||
cdefines=["APP_NFC"],
|
||||
requires=[
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "nfc_i.h"
|
||||
#include "furi_hal_nfc.h"
|
||||
#include <furi_hal_nfc.h>
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
bool nfc_custom_event_callback(void* context, uint32_t event) {
|
||||
|
@@ -2,6 +2,7 @@ App(
|
||||
appid="subghz",
|
||||
name="Sub-GHz",
|
||||
apptype=FlipperAppType.APP,
|
||||
targets=["f7"],
|
||||
entry_point="subghz_app",
|
||||
cdefines=["APP_SUBGHZ"],
|
||||
requires=[
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "../u2f_app_i.h"
|
||||
#include "../views/u2f_view.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
#include "furi_hal.h"
|
||||
#include <furi_hal.h>
|
||||
#include "../u2f.h"
|
||||
|
||||
#define U2F_REQUEST_TIMEOUT 500
|
||||
|
@@ -6,6 +6,7 @@
|
||||
#include <storage/storage.h>
|
||||
#include <lib/flipper_format/flipper_format.h>
|
||||
|
||||
#include <math.h>
|
||||
#include <m-array.h>
|
||||
|
||||
#define TAG "MusicPlayerWorker"
|
||||
|
@@ -2,6 +2,7 @@ App(
|
||||
appid="nfc_magic",
|
||||
name="Nfc Magic",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
targets=["f7"],
|
||||
entry_point="nfc_magic_app",
|
||||
requires=[
|
||||
"storage",
|
||||
|
@@ -2,6 +2,7 @@ App(
|
||||
appid="picopass",
|
||||
name="PicoPass Reader",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
targets=["f7"],
|
||||
entry_point="picopass_app",
|
||||
requires=[
|
||||
"storage",
|
||||
|
@@ -2,8 +2,8 @@
|
||||
|
||||
#include "scenes/signal_gen_scene.h"
|
||||
|
||||
#include "furi_hal_clock.h"
|
||||
#include "furi_hal_pwm.h"
|
||||
#include <furi_hal_clock.h>
|
||||
#include <furi_hal_pwm.h>
|
||||
|
||||
#include <gui/gui.h>
|
||||
#include <gui/view_dispatcher.h>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "../signal_gen_app_i.h"
|
||||
#include "furi_hal.h"
|
||||
#include <furi_hal.h>
|
||||
#include <gui/elements.h>
|
||||
#include <signal_generator_icons.h>
|
||||
|
||||
|
@@ -2,6 +2,7 @@ App(
|
||||
appid="weather_station",
|
||||
name="Weather Station",
|
||||
apptype=FlipperAppType.PLUGIN,
|
||||
targets=["f7"],
|
||||
entry_point="weather_station_app",
|
||||
cdefines=["APP_WEATHER_STATION"],
|
||||
requires=["gui"],
|
||||
|
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <lib/flipper_format/flipper_format.h>
|
||||
#include "furi.h"
|
||||
#include "furi_hal.h"
|
||||
#include <furi_hal.h>
|
||||
#include <lib/subghz/types.h>
|
||||
#include <locale/locale.h>
|
||||
|
||||
|
@@ -5,28 +5,6 @@
|
||||
#include <furi_hal.h>
|
||||
#include <lib/toolbox/args.h>
|
||||
|
||||
typedef struct {
|
||||
const GpioPin* pin;
|
||||
const char* name;
|
||||
const bool debug;
|
||||
} CliCommandGpio;
|
||||
|
||||
const CliCommandGpio cli_command_gpio_pins[] = {
|
||||
{.pin = &gpio_ext_pc0, .name = "PC0", .debug = false},
|
||||
{.pin = &gpio_ext_pc1, .name = "PC1", .debug = false},
|
||||
{.pin = &gpio_ext_pc3, .name = "PC3", .debug = false},
|
||||
{.pin = &gpio_ext_pb2, .name = "PB2", .debug = false},
|
||||
{.pin = &gpio_ext_pb3, .name = "PB3", .debug = false},
|
||||
{.pin = &gpio_ext_pa4, .name = "PA4", .debug = false},
|
||||
{.pin = &gpio_ext_pa6, .name = "PA6", .debug = false},
|
||||
{.pin = &gpio_ext_pa7, .name = "PA7", .debug = false},
|
||||
/* Dangerous pins, may damage hardware */
|
||||
{.pin = &gpio_infrared_rx, .name = "PA0", .debug = true},
|
||||
{.pin = &gpio_usart_rx, .name = "PB7", .debug = true},
|
||||
{.pin = &gpio_speaker, .name = "PB8", .debug = true},
|
||||
{.pin = &gpio_infrared_tx, .name = "PB9", .debug = true},
|
||||
};
|
||||
|
||||
void cli_command_gpio_print_usage() {
|
||||
printf("Usage:\r\n");
|
||||
printf("gpio <cmd> <args>\r\n");
|
||||
@@ -38,9 +16,9 @@ void cli_command_gpio_print_usage() {
|
||||
|
||||
static bool pin_name_to_int(FuriString* pin_name, size_t* result) {
|
||||
bool is_debug_mode = furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug);
|
||||
for(size_t i = 0; i < COUNT_OF(cli_command_gpio_pins); i++) {
|
||||
if(furi_string_equal(pin_name, cli_command_gpio_pins[i].name)) {
|
||||
if(!cli_command_gpio_pins[i].debug || is_debug_mode) {
|
||||
for(size_t i = 0; i < gpio_pins_count; i++) {
|
||||
if(furi_string_equal(pin_name, gpio_pins[i].name)) {
|
||||
if(!gpio_pins[i].debug || is_debug_mode) {
|
||||
*result = i;
|
||||
return true;
|
||||
}
|
||||
@@ -53,9 +31,9 @@ static bool pin_name_to_int(FuriString* pin_name, size_t* result) {
|
||||
static void gpio_print_pins(void) {
|
||||
printf("Wrong pin name. Available pins: ");
|
||||
bool is_debug_mode = furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug);
|
||||
for(size_t i = 0; i < COUNT_OF(cli_command_gpio_pins); i++) {
|
||||
if(!cli_command_gpio_pins[i].debug || is_debug_mode) {
|
||||
printf("%s ", cli_command_gpio_pins[i].name);
|
||||
for(size_t i = 0; i < gpio_pins_count; i++) {
|
||||
if(!gpio_pins[i].debug || is_debug_mode) {
|
||||
printf("%s ", gpio_pins[i].name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -113,7 +91,7 @@ void cli_command_gpio_mode(Cli* cli, FuriString* args, void* context) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(cli_command_gpio_pins[num].debug) { //-V779
|
||||
if(gpio_pins[num].debug) { //-V779
|
||||
printf(
|
||||
"Changing this pin mode may damage hardware. Are you sure you want to continue? (y/n)?\r\n");
|
||||
char c = cli_getc(cli);
|
||||
@@ -124,12 +102,12 @@ void cli_command_gpio_mode(Cli* cli, FuriString* args, void* context) {
|
||||
}
|
||||
|
||||
if(value == 1) { // output
|
||||
furi_hal_gpio_write(cli_command_gpio_pins[num].pin, false);
|
||||
furi_hal_gpio_init_simple(cli_command_gpio_pins[num].pin, GpioModeOutputPushPull);
|
||||
printf("Pin %s is now an output (low)", cli_command_gpio_pins[num].name);
|
||||
furi_hal_gpio_write(gpio_pins[num].pin, false);
|
||||
furi_hal_gpio_init_simple(gpio_pins[num].pin, GpioModeOutputPushPull);
|
||||
printf("Pin %s is now an output (low)", gpio_pins[num].name);
|
||||
} else { // input
|
||||
furi_hal_gpio_init_simple(cli_command_gpio_pins[num].pin, GpioModeInput);
|
||||
printf("Pin %s is now an input", cli_command_gpio_pins[num].name);
|
||||
furi_hal_gpio_init_simple(gpio_pins[num].pin, GpioModeInput);
|
||||
printf("Pin %s is now an input", gpio_pins[num].name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,15 +122,14 @@ void cli_command_gpio_read(Cli* cli, FuriString* args, void* context) {
|
||||
}
|
||||
|
||||
if(LL_GPIO_MODE_INPUT != //-V779
|
||||
LL_GPIO_GetPinMode(
|
||||
cli_command_gpio_pins[num].pin->port, cli_command_gpio_pins[num].pin->pin)) {
|
||||
printf("Err: pin %s is not set as an input.", cli_command_gpio_pins[num].name);
|
||||
LL_GPIO_GetPinMode(gpio_pins[num].pin->port, gpio_pins[num].pin->pin)) {
|
||||
printf("Err: pin %s is not set as an input.", gpio_pins[num].name);
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t val = !!furi_hal_gpio_read(cli_command_gpio_pins[num].pin);
|
||||
uint8_t val = !!furi_hal_gpio_read(gpio_pins[num].pin);
|
||||
|
||||
printf("Pin %s <= %u", cli_command_gpio_pins[num].name, val);
|
||||
printf("Pin %s <= %u", gpio_pins[num].name, val);
|
||||
}
|
||||
|
||||
void cli_command_gpio_set(Cli* cli, FuriString* args, void* context) {
|
||||
@@ -174,14 +151,13 @@ void cli_command_gpio_set(Cli* cli, FuriString* args, void* context) {
|
||||
}
|
||||
|
||||
if(LL_GPIO_MODE_OUTPUT != //-V779
|
||||
LL_GPIO_GetPinMode(
|
||||
cli_command_gpio_pins[num].pin->port, cli_command_gpio_pins[num].pin->pin)) {
|
||||
printf("Err: pin %s is not set as an output.", cli_command_gpio_pins[num].name);
|
||||
LL_GPIO_GetPinMode(gpio_pins[num].pin->port, gpio_pins[num].pin->pin)) {
|
||||
printf("Err: pin %s is not set as an output.", gpio_pins[num].name);
|
||||
return;
|
||||
}
|
||||
|
||||
// Extra check if debug pins used
|
||||
if(cli_command_gpio_pins[num].debug) {
|
||||
if(gpio_pins[num].debug) {
|
||||
printf(
|
||||
"Setting this pin may damage hardware. Are you sure you want to continue? (y/n)?\r\n");
|
||||
char c = cli_getc(cli);
|
||||
@@ -191,8 +167,8 @@ void cli_command_gpio_set(Cli* cli, FuriString* args, void* context) {
|
||||
}
|
||||
}
|
||||
|
||||
furi_hal_gpio_write(cli_command_gpio_pins[num].pin, !!value);
|
||||
printf("Pin %s => %u", cli_command_gpio_pins[num].name, !!value);
|
||||
furi_hal_gpio_write(gpio_pins[num].pin, !!value);
|
||||
printf("Pin %s => %u", gpio_pins[num].name, !!value);
|
||||
}
|
||||
|
||||
void cli_command_gpio(Cli* cli, FuriString* args, void* context) {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "dialogs/dialogs_message.h"
|
||||
#include "dialogs_message.h"
|
||||
#include "dialogs_i.h"
|
||||
#include <toolbox/api_lock.h>
|
||||
#include <assets_icons.h>
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#include "dialogs_i.h"
|
||||
|
||||
#include <gui/modules/file_browser.h>
|
||||
#include <toolbox/api_lock.h>
|
||||
#include "gui/modules/file_browser.h"
|
||||
|
||||
typedef struct {
|
||||
FuriApiLock lock;
|
||||
|
@@ -1,8 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <core/pubsub.h>
|
||||
#include "gui/view.h"
|
||||
#include "helpers/dolphin_deed.h"
|
||||
|
||||
#include <gui/view.h>
|
||||
#include <core/pubsub.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@@ -1,16 +1,17 @@
|
||||
#include "elements.h"
|
||||
#include "m-core.h"
|
||||
#include <m-core.h>
|
||||
#include <assets_icons.h>
|
||||
#include "furi_hal_resources.h"
|
||||
#include <furi_hal_resources.h>
|
||||
#include <furi_hal.h>
|
||||
#include "gui/canvas.h"
|
||||
|
||||
#include <gui/canvas.h>
|
||||
#include <gui/icon_i.h>
|
||||
#include <gui/icon_animation_i.h>
|
||||
|
||||
#include <furi.h>
|
||||
#include "canvas_i.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
@@ -1,4 +1,3 @@
|
||||
#include "gui/canvas.h"
|
||||
#include "gui_i.h"
|
||||
#include <assets_icons.h>
|
||||
|
||||
|
@@ -1,12 +1,15 @@
|
||||
#include "button_menu.h"
|
||||
#include "gui/canvas.h"
|
||||
#include "gui/elements.h"
|
||||
#include "input/input.h"
|
||||
#include <m-array.h>
|
||||
|
||||
#include <gui/canvas.h>
|
||||
#include <gui/elements.h>
|
||||
#include <input/input.h>
|
||||
|
||||
#include <furi.h>
|
||||
#include <stdint.h>
|
||||
#include <assets_icons.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <m-array.h>
|
||||
|
||||
#define ITEM_FIRST_OFFSET 17
|
||||
#define ITEM_NEXT_OFFSET 4
|
||||
#define ITEM_HEIGHT 14
|
||||
|
@@ -1,12 +1,15 @@
|
||||
#include "button_panel.h"
|
||||
#include "furi_hal_resources.h"
|
||||
#include "gui/canvas.h"
|
||||
|
||||
#include <gui/canvas.h>
|
||||
#include <gui/elements.h>
|
||||
|
||||
#include <furi.h>
|
||||
#include <furi_hal_resources.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <m-array.h>
|
||||
#include <m-i-list.h>
|
||||
#include <m-list.h>
|
||||
#include <furi.h>
|
||||
#include <gui/elements.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
// uint16_t to support multi-screen, wide button panel
|
||||
|
@@ -1,8 +1,9 @@
|
||||
#include <furi.h>
|
||||
#include <gui/elements.h>
|
||||
#include <assets_icons.h>
|
||||
#include "byte_input.h"
|
||||
|
||||
#include <gui/elements.h>
|
||||
#include <furi.h>
|
||||
#include <assets_icons.h>
|
||||
|
||||
struct ByteInput {
|
||||
View* view;
|
||||
};
|
||||
|
@@ -1,14 +1,17 @@
|
||||
#include "file_browser.h"
|
||||
#include "assets_icons.h"
|
||||
#include "file_browser_worker.h"
|
||||
|
||||
#include <gui/elements.h>
|
||||
#include <assets_icons.h>
|
||||
#include <toolbox/path.h>
|
||||
|
||||
#include <furi.h>
|
||||
#include <furi_hal_resources.h>
|
||||
|
||||
#include <core/check.h>
|
||||
#include <core/common_defines.h>
|
||||
#include <core/log.h>
|
||||
#include "furi_hal_resources.h"
|
||||
#include <m-array.h>
|
||||
#include <gui/elements.h>
|
||||
#include <furi.h>
|
||||
#include "toolbox/path.h"
|
||||
|
||||
#define LIST_ITEMS 5u
|
||||
#define MAX_LEN_PX 110
|
||||
|
@@ -1,13 +1,16 @@
|
||||
#include "file_browser_worker.h"
|
||||
|
||||
#include <storage/filesystem_api_defines.h>
|
||||
#include <storage/storage.h>
|
||||
|
||||
#include <toolbox/path.h>
|
||||
#include <core/check.h>
|
||||
#include <core/common_defines.h>
|
||||
#include "storage/filesystem_api_defines.h"
|
||||
#include <furi.h>
|
||||
|
||||
#include <m-array.h>
|
||||
#include <stdbool.h>
|
||||
#include <storage/storage.h>
|
||||
#include <furi.h>
|
||||
#include <stddef.h>
|
||||
#include "toolbox/path.h"
|
||||
|
||||
#define TAG "BrowserWorker"
|
||||
|
||||
|
@@ -1,13 +1,14 @@
|
||||
#include <stdint.h>
|
||||
#include <furi.h>
|
||||
#include <assets_icons.h>
|
||||
#include "loading.h"
|
||||
|
||||
#include <gui/icon_animation.h>
|
||||
#include <gui/elements.h>
|
||||
#include <gui/canvas.h>
|
||||
#include <gui/view.h>
|
||||
#include <input/input.h>
|
||||
|
||||
#include "loading.h"
|
||||
#include <furi.h>
|
||||
#include <assets_icons.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct Loading {
|
||||
View* view;
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#include "menu.h"
|
||||
|
||||
#include <m-array.h>
|
||||
#include <gui/elements.h>
|
||||
#include <assets_icons.h>
|
||||
#include <furi.h>
|
||||
#include <m-array.h>
|
||||
|
||||
struct Menu {
|
||||
View* view;
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include "submenu.h"
|
||||
|
||||
#include <m-array.h>
|
||||
#include <gui/elements.h>
|
||||
#include <furi.h>
|
||||
#include <m-array.h>
|
||||
|
||||
struct Submenu {
|
||||
View* view;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "text_box.h"
|
||||
#include "gui/canvas.h"
|
||||
#include <furi.h>
|
||||
#include <gui/canvas.h>
|
||||
#include <gui/elements.h>
|
||||
#include <furi.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct TextBox {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include <furi.h>
|
||||
#include "validators.h"
|
||||
#include <storage/storage.h>
|
||||
#include <furi.h>
|
||||
|
||||
struct ValidatorIsFile {
|
||||
char* app_path_folder;
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <core/common_defines.h>
|
||||
#include <core/string.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include "variable_item_list.h"
|
||||
#include "gui/canvas.h"
|
||||
#include <m-array.h>
|
||||
#include <furi.h>
|
||||
#include <gui/elements.h>
|
||||
#include <gui/canvas.h>
|
||||
#include <furi.h>
|
||||
#include <m-array.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct VariableItem {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <furi.h>
|
||||
#include "widget.h"
|
||||
#include <m-array.h>
|
||||
#include "widget_elements/widget_element_i.h"
|
||||
#include <furi.h>
|
||||
#include <m-array.h>
|
||||
|
||||
ARRAY_DEF(ElementArray, WidgetElement*, M_PTR_OPLIST);
|
||||
|
||||
|
@@ -1,8 +1,9 @@
|
||||
#include "gui/view.h"
|
||||
#include <core/memmgr.h>
|
||||
#include "view_stack.h"
|
||||
#include "view_i.h"
|
||||
|
||||
#include <gui/view.h>
|
||||
#include <core/memmgr.h>
|
||||
|
||||
#define MAX_VIEWS 3
|
||||
|
||||
typedef struct {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "furi_hal_light.h"
|
||||
#include <furi_hal_light.h>
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
#include <storage/storage.h>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "furi_hal_resources.h"
|
||||
#include <furi_hal_resources.h>
|
||||
#include "notification.h"
|
||||
#include "notification_messages_notes.h"
|
||||
#include <stddef.h>
|
||||
|
@@ -13,17 +13,29 @@ typedef DialogMessageButton (*AboutDialogScreen)(DialogsApp* dialogs, DialogMess
|
||||
static DialogMessageButton product_screen(DialogsApp* dialogs, DialogMessage* message) {
|
||||
DialogMessageButton result;
|
||||
|
||||
const char* screen_header = "Product: Flipper Zero\n"
|
||||
"Model: FZ.1\n";
|
||||
const char* screen_text = "FCC ID: 2A2V6-FZ\n"
|
||||
"IC: 27624-FZ";
|
||||
FuriString* screen_header = furi_string_alloc_printf(
|
||||
"Product: %s\n"
|
||||
"Model: %s",
|
||||
furi_hal_version_get_model_name(),
|
||||
furi_hal_version_get_model_code());
|
||||
|
||||
dialog_message_set_header(message, screen_header, 0, 0, AlignLeft, AlignTop);
|
||||
dialog_message_set_text(message, screen_text, 0, 26, AlignLeft, AlignTop);
|
||||
FuriString* screen_text = furi_string_alloc_printf(
|
||||
"FCC ID: %s\n"
|
||||
"IC: %s",
|
||||
furi_hal_version_get_fcc_id(),
|
||||
furi_hal_version_get_ic_id());
|
||||
|
||||
dialog_message_set_header(
|
||||
message, furi_string_get_cstr(screen_header), 0, 0, AlignLeft, AlignTop);
|
||||
dialog_message_set_text(
|
||||
message, furi_string_get_cstr(screen_text), 0, 26, AlignLeft, AlignTop);
|
||||
result = dialog_message_show(dialogs, message);
|
||||
dialog_message_set_header(message, NULL, 0, 0, AlignLeft, AlignTop);
|
||||
dialog_message_set_text(message, NULL, 0, 0, AlignLeft, AlignTop);
|
||||
|
||||
furi_string_free(screen_header);
|
||||
furi_string_free(screen_text);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "../bt_settings_app.h"
|
||||
#include "furi_hal_bt.h"
|
||||
#include <furi_hal_bt.h>
|
||||
|
||||
void bt_settings_scene_forget_dev_confirm_dialog_callback(DialogExResult result, void* context) {
|
||||
furi_assert(context);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "../bt_settings_app.h"
|
||||
#include "furi_hal_bt.h"
|
||||
#include <furi_hal_bt.h>
|
||||
|
||||
void bt_settings_app_scene_forget_dev_success_popup_callback(void* context) {
|
||||
BtSettingsApp* app = context;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "../bt_settings_app.h"
|
||||
#include "furi_hal_bt.h"
|
||||
#include <furi_hal_bt.h>
|
||||
|
||||
enum BtSetting {
|
||||
BtSettingOff,
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "../storage_move_to_sd.h"
|
||||
#include "gui/canvas.h"
|
||||
#include "gui/modules/widget_elements/widget_element_i.h"
|
||||
#include "storage/storage.h"
|
||||
#include <gui/canvas.h>
|
||||
#include <gui/modules/widget_elements/widget_element_i.h>
|
||||
#include <storage/storage.h>
|
||||
|
||||
static void storage_move_to_sd_scene_confirm_widget_callback(
|
||||
GuiButtonType result,
|
||||
|
@@ -1,17 +1,16 @@
|
||||
#pragma once
|
||||
#include "gui/modules/widget_elements/widget_element_i.h"
|
||||
#include <furi.h>
|
||||
#include <gui/gui.h>
|
||||
#include <gui/view.h>
|
||||
#include <gui/view_dispatcher.h>
|
||||
#include <gui/scene_manager.h>
|
||||
#include <notification/notification_messages.h>
|
||||
|
||||
#include <gui/modules/widget.h>
|
||||
#include <gui/modules/popup.h>
|
||||
#include <gui/modules/widget_elements/widget_element_i.h>
|
||||
|
||||
#include <notification/notification_messages.h>
|
||||
#include <storage/storage.h>
|
||||
#include <storage/storage_sd_api.h>
|
||||
#include <furi.h>
|
||||
|
||||
#include "scenes/storage_move_to_sd_scene.h"
|
||||
|
||||
|
@@ -76,8 +76,8 @@ static void updater_cli_ep(Cli* cli, FuriString* args, void* context) {
|
||||
for(size_t idx = 0; idx < COUNT_OF(update_cli_subcommands); ++idx) {
|
||||
const CliSubcommand* subcmd_def = &update_cli_subcommands[idx];
|
||||
if(furi_string_cmp_str(subcommand, subcmd_def->command) == 0) {
|
||||
furi_string_free(subcommand);
|
||||
subcmd_def->handler(args);
|
||||
furi_string_free(subcommand);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -287,7 +287,9 @@ bool update_task_parse_manifest(UpdateTask* update_task) {
|
||||
}
|
||||
|
||||
update_task_set_progress(update_task, UpdateTaskStageProgress, 50);
|
||||
if(manifest->target != furi_hal_version_get_hw_target()) {
|
||||
/* Check target only if it's set - skipped for pre-production samples */
|
||||
if(furi_hal_version_get_hw_target() &&
|
||||
(manifest->target != furi_hal_version_get_hw_target())) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user