mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-24 05:48:08 +03:00
d1ad924216
* [AVR_ISP]: add AVR ISP Programmer FAP * [AVR_ISP]: add auto detect AVR chip * [AVR_ISP]: fix auto detect chip * [AVR_ISP]: fix fast write flash * AVR_ISP: auto set SPI speed * AVR_ISP: add clock 4Mhz on &gpio_ext_pa4 * AVR_ISP: fix "[CRASH][ISR 4] NULL pointer dereference" with no AVR chip connected * AVR_ISP: add AVR ISP Reader * AVR_ISP: add read and check I32HEX file * AVR_ISP: add write eerom, flash, fuse, lock byte * AVR_ISP: add gui Reader, Writer * Github: unshallow on decontamination * AVR_ISP: move to external * API: fix api_symbols * AVR_ISP: add wiring scene * GUI: model mutex FuriMutexTypeNormal -> FuriMutexTypeRecursive * AVR_ISP: add chip_detect view * AVR_ISP: refactoring gui ISP Programmer * AVR_ISP: add gui "Dump AVR" * AVR_ISP: add gui "Flash AVR" * AVR_ISP: fix navigation gui * GUI: model mutex FuriMutexTypeRecursive -> FuriMutexTypeNormal * AVR_ISP: fix conflicts * AVR_ISP: fix build * AVR_ISP: delete images * AVR_ISP: add images * AVR_ISP: fix gui * AVR_ISP: fix stuck in navigation * AVR_ISP: changing the Fuse bit recording logic * AVR_ISP: fix read/write chips with memory greater than 64Kb * AVR_ISP: fix auto set speed SPI * AVR_ISP: fix gui * ISP: switching on +5 volts to an external GPIO Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
32 lines
1013 B
C
32 lines
1013 B
C
#include "avr_isp_app_i.h"
|
|
#include <lib/toolbox/path.h>
|
|
#include <flipper_format/flipper_format_i.h>
|
|
|
|
#define TAG "AvrIsp"
|
|
|
|
bool avr_isp_load_from_file(AvrIspApp* app) {
|
|
furi_assert(app);
|
|
|
|
FuriString* file_path = furi_string_alloc();
|
|
FuriString* file_name = furi_string_alloc();
|
|
|
|
DialogsFileBrowserOptions browser_options;
|
|
dialog_file_browser_set_basic_options(
|
|
&browser_options, AVR_ISP_APP_EXTENSION, &I_avr_app_icon_10x10);
|
|
browser_options.base_path = STORAGE_APP_DATA_PATH_PREFIX;
|
|
|
|
// Input events and views are managed by file_select
|
|
bool res = dialog_file_browser_show(app->dialogs, file_path, app->file_path, &browser_options);
|
|
|
|
if(res) {
|
|
path_extract_dirname(furi_string_get_cstr(file_path), app->file_path);
|
|
path_extract_filename(file_path, file_name, true);
|
|
strncpy(app->file_name_tmp, furi_string_get_cstr(file_name), AVR_ISP_MAX_LEN_NAME);
|
|
}
|
|
|
|
furi_string_free(file_name);
|
|
furi_string_free(file_path);
|
|
|
|
return res;
|
|
}
|