mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 20:49:49 +04:00
Merge branch 'dev' into release
This commit is contained in:
43
CHANGELOG.md
43
CHANGELOG.md
@@ -1,44 +1,7 @@
|
||||
### New changes
|
||||
* Note: Due to latest official changes this release was delayed - release was tested by group of users, and some of them reported getting one crash on "furi_check failed", but this can not be reproduced in any way we tried, so, please if you found any issues with BLE (+ Mobile app) that results in crash, create issue with all details how you got it and how many times, and detailed steps on repeating such issue, if you got one crash and can't get it again, collect information how it happened and create issue with as much details as possible -> Thanks!
|
||||
* SubGHz: New option to use timestamps + protocol name when you saving file, instead of random name - Enable in `Radio Settings -> Time in names = ON`
|
||||
* SubGHz: Read mode UI improvements (scrolling text, + shows time when signal was received) (by @wosk | PR #429)
|
||||
* SubGHz: New options to ignore Magellan, Cars(ScherKhan, Kia)(no you can't send that signals)
|
||||
* SubGHz: Fix keeloq custom buttons bugs
|
||||
* SubGhz: Nero Radio 57bit **experimental** support + encoder improvements and decoder changes
|
||||
* SubGhz: Fix RAW recording and reading, (bug where raw file plays endlessly) (Fixes issue #431)
|
||||
* SubGHz Remote: Add Alutech AT4N Support, fix some issues
|
||||
* Power GUI: Changing battery style doesnt require reboot (Added API to trigger UI change from different place) (Inspired by @ESurge work)
|
||||
* Plugins: BLE Remote -> Keynote with vertical layout (by @Kami-no | PR #428)
|
||||
* Plugins: Improve wifi marauder keyboard (added extra symbols!) (Port uart terminal keyboard into wifi marauder)
|
||||
* Infrared: Update universal remote assets (by @amec0e | PR #421)
|
||||
* Docs: Update build docs (by @PhoenixSheppy | PR #425)
|
||||
* OFW: cubewb: updated to v1.16.0 -> **Part 2 of "Various stop mode fixes"**
|
||||
* OFW: github: testing SDK with ufbt action
|
||||
* OFW: Raw RFID documentation
|
||||
* OFW: Introduce stealth mode and auto-selective lock
|
||||
* OFW: Active RPC session icon -> **Breaking API change, api was changed from 22.x to 23.x**
|
||||
* OFW: Various stop mode fixes -> **Should fix known issues with BLE (Random freezes, menu freeze, BT Remote plugin freeze) and other similar issues**
|
||||
* OFW: Picopass: Correctly aborts when correct key is found -> Fixes Bug (Picopass app not reading elite keyed cards anymore. #413)
|
||||
### Pre-release changes
|
||||
* If you have copied apps into `apps` folder - remove `apps` folder on your microSD before installing this release to avoid issues!
|
||||
* SubGHz: (Bug that I decided to keep as a feature) You can change default button (Ok) for remote by holding custom button and pressing back at same time (same can be used to restore your button if you changed it accidentally) - Be careful, it might be unstable, I will make proper option to change button in next releases
|
||||
* SubGHz: Fixes for custom button bugs in SubGHz Remote app
|
||||
* SubGHz: Add alutech table to enviroment alloc and free
|
||||
* Docs: Fix and update docs - thanks to @lesterrry
|
||||
* Plugins: Bluetooth Remote - implemented YouTube Shorts Remote (may be unstable)
|
||||
* Plugins: Bluetooth Remote - improvements and fixes for TikTok remote (by @krolchonok | PR #420 and #432)
|
||||
* Plugins: Implement an array for baudrates on GPS UART app (+ add 19200 baud) (by @p0ns | PR #416)
|
||||
* Plugins: Remove UART Echo from releases since it is locked on 115200 baud, and we have **UART Terminal** with ability to set baudrate
|
||||
* Plugins: Update **TOTP (Authenticator)** [(by akopachov)](https://github.com/akopachov/flipper-zero_authenticator)
|
||||
* Plugins: Update **UART Terminal** [(by cool4uma)](https://github.com/cool4uma/UART_Terminal/tree/main)
|
||||
* OFW: Deep Sleep Idle - **Improves battery usage!!!** -> **Breaking API change, api was changed from 21.x to 22.x**
|
||||
* OFW: FuriHal: pwr pulls for some pins
|
||||
* OFW: Bugfix: ISP Programmer and SubGhz
|
||||
* OFW: AVR_ISP: fix NULL pointer dereference
|
||||
* OFW: Fix gpio state isp programmer
|
||||
* OFW: ufbt: project & debugging updates
|
||||
* OFW: FuriHal: fix gpio naming and add explicit pulls for vibro, speaker and ir_tx -> **Breaking API change, api was changed from 20.x to 21.x**
|
||||
**(this will make your manually copied plugins not work, update them in same way you installed them, or delete `apps` folder and then install firmware, if you using extra pack builds (with `e` in version) all apps in _Extra will be updated automatically)**
|
||||
* Power + BLE Stack: Reverted OFW BLE stack upgrade, reverted deep sleep -> Temporarily, due to NFC issues, need more research on how deepsleep affects all systems -> **If you got any NFC (or orther) crashes / freezes on 044 release please upgrade to this one**
|
||||
* SubGHz: Combining add manual scenes (by @gid9798 | PR #433)
|
||||
* SubGHz: Fix add manually naming
|
||||
|
||||
#### [🎲 Download latest extra apps pack](https://github.com/xMasterX/all-the-plugins/archive/refs/heads/main.zip)
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "fap_loader_app.h"
|
||||
|
||||
#include <furi.h>
|
||||
#include <furi_hal_debug.h>
|
||||
|
||||
#include <assets_icons.h>
|
||||
#include <gui/gui.h>
|
||||
@@ -24,6 +23,8 @@ struct FapLoader {
|
||||
Loading* loading;
|
||||
};
|
||||
|
||||
volatile bool fap_loader_debug_active = false;
|
||||
|
||||
bool fap_loader_load_name_and_icon(
|
||||
FuriString* path,
|
||||
Storage* storage,
|
||||
@@ -133,7 +134,7 @@ static bool fap_loader_run_selected_app(FapLoader* loader, bool ignore_mismatch)
|
||||
FuriThread* thread = flipper_application_spawn(loader->app, NULL);
|
||||
|
||||
/* This flag is set by the debugger - to break on app start */
|
||||
if(furi_hal_debug_is_gdb_session_active()) {
|
||||
if(fap_loader_debug_active) {
|
||||
FURI_LOG_W(TAG, "Triggering BP for debugger");
|
||||
/* After hitting this, you can set breakpoints in your .fap's code
|
||||
* Note that you have to toggle breakpoints that were set before */
|
||||
|
||||
@@ -19,12 +19,9 @@ ADD_SCENE(subghz, test_static, TestStatic)
|
||||
ADD_SCENE(subghz, test_packet, TestPacket)
|
||||
#endif
|
||||
ADD_SCENE(subghz, set_type, SetType)
|
||||
ADD_SCENE(subghz, set_fix_faac, SetFixFaac)
|
||||
ADD_SCENE(subghz, set_cnt_faac, SetCntFaac)
|
||||
ADD_SCENE(subghz, set_seed_faac, SetSeedFaac)
|
||||
ADD_SCENE(subghz, set_fix_bft, SetFixBft)
|
||||
ADD_SCENE(subghz, set_cnt_bft, SetCntBft)
|
||||
ADD_SCENE(subghz, set_seed_bft, SetSeedBft)
|
||||
ADD_SCENE(subghz, set_fix, SetFix)
|
||||
ADD_SCENE(subghz, set_cnt, SetCnt)
|
||||
ADD_SCENE(subghz, set_seed, SetSeed)
|
||||
ADD_SCENE(subghz, frequency_analyzer, FrequencyAnalyzer)
|
||||
ADD_SCENE(subghz, ext_module_settings, ExtModuleSettings)
|
||||
ADD_SCENE(subghz, read_raw, ReadRAW)
|
||||
|
||||
@@ -62,7 +62,7 @@ void subghz_scene_save_name_on_enter(void* context) {
|
||||
if(subghz->txrx->decoder_result != 0x0) {
|
||||
if(subghz->txrx->decoder_result != NULL) {
|
||||
if(strlen(subghz->txrx->decoder_result->protocol->name) != 0) {
|
||||
if(strcmp(subghz->txrx->decoder_result->protocol->name, "BinRAW") == 0) {
|
||||
if(subghz->from_add_manually) {
|
||||
subghz_scene_save_name_get_timefilename(file_name, "S", true);
|
||||
} else {
|
||||
subghz_scene_save_name_get_timefilename(
|
||||
@@ -198,6 +198,8 @@ bool subghz_scene_save_name_on_event(void* context, SceneManagerEvent event) {
|
||||
void subghz_scene_save_name_on_exit(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
subghz->from_add_manually = false;
|
||||
|
||||
// Clear validator
|
||||
void* validator_context = text_input_get_validator_callback_context(subghz->text_input);
|
||||
text_input_set_validator(subghz->text_input, NULL, NULL);
|
||||
|
||||
66
applications/main/subghz/scenes/subghz_scene_set_cnt.c
Normal file
66
applications/main/subghz/scenes/subghz_scene_set_cnt.c
Normal file
@@ -0,0 +1,66 @@
|
||||
#include "../subghz_i.h"
|
||||
|
||||
#define TAG "SubGhzSetCnt"
|
||||
|
||||
void subghz_scene_set_cnt_byte_input_callback(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
view_dispatcher_send_custom_event(subghz->view_dispatcher, SubGhzCustomEventByteInputDone);
|
||||
}
|
||||
|
||||
void subghz_scene_set_cnt_on_enter(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
// Setup view
|
||||
ByteInput* byte_input = subghz->byte_input;
|
||||
SubGhzCustomEvent state =
|
||||
scene_manager_get_scene_state(subghz->scene_manager, SubGhzSceneSetType);
|
||||
|
||||
switch(state) {
|
||||
case SubmenuIndexBFTClone:
|
||||
byte_input_set_header_text(byte_input, "Enter COUNTER in hex");
|
||||
byte_input_set_result_callback(
|
||||
byte_input,
|
||||
subghz_scene_set_cnt_byte_input_callback,
|
||||
NULL,
|
||||
subghz,
|
||||
subghz->txrx->secure_data->cnt,
|
||||
2);
|
||||
break;
|
||||
case SubmenuIndexFaacSLH_433:
|
||||
case SubmenuIndexFaacSLH_868:
|
||||
byte_input_set_header_text(byte_input, "Enter COUNTER in hex, 20bits");
|
||||
byte_input_set_result_callback(
|
||||
byte_input,
|
||||
subghz_scene_set_cnt_byte_input_callback,
|
||||
NULL,
|
||||
subghz,
|
||||
subghz->txrx->secure_data->cnt,
|
||||
3);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdByteInput);
|
||||
}
|
||||
|
||||
bool subghz_scene_set_cnt_on_event(void* context, SceneManagerEvent event) {
|
||||
SubGhz* subghz = context;
|
||||
bool consumed = false;
|
||||
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == SubGhzCustomEventByteInputDone) {
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSetSeed);
|
||||
consumed = true;
|
||||
}
|
||||
}
|
||||
return consumed;
|
||||
}
|
||||
|
||||
void subghz_scene_set_cnt_on_exit(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
// Clear view
|
||||
byte_input_set_result_callback(subghz->byte_input, NULL, NULL, NULL, NULL, 0);
|
||||
byte_input_set_header_text(subghz->byte_input, "");
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
#include "../subghz_i.h"
|
||||
|
||||
#define TAG "SubGhzSetCntBft"
|
||||
|
||||
void subghz_scene_set_cnt_bft_byte_input_callback(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
view_dispatcher_send_custom_event(subghz->view_dispatcher, SubGhzCustomEventByteInputDone);
|
||||
}
|
||||
|
||||
void subghz_scene_set_cnt_bft_on_enter(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
// Setup view
|
||||
ByteInput* byte_input = subghz->byte_input;
|
||||
byte_input_set_header_text(byte_input, "Enter COUNTER in hex");
|
||||
byte_input_set_result_callback(
|
||||
byte_input,
|
||||
subghz_scene_set_cnt_bft_byte_input_callback,
|
||||
NULL,
|
||||
subghz,
|
||||
subghz->txrx->secure_data->cnt,
|
||||
2);
|
||||
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdByteInput);
|
||||
}
|
||||
|
||||
bool subghz_scene_set_cnt_bft_on_event(void* context, SceneManagerEvent event) {
|
||||
SubGhz* subghz = context;
|
||||
bool consumed = false;
|
||||
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == SubGhzCustomEventByteInputDone) {
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSetSeedBft);
|
||||
consumed = true;
|
||||
}
|
||||
}
|
||||
return consumed;
|
||||
}
|
||||
|
||||
void subghz_scene_set_cnt_bft_on_exit(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
// Clear view
|
||||
byte_input_set_result_callback(subghz->byte_input, NULL, NULL, NULL, NULL, 0);
|
||||
byte_input_set_header_text(subghz->byte_input, "");
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
#include "../subghz_i.h"
|
||||
|
||||
#define TAG "SubGhzSetCntFaac"
|
||||
|
||||
void subghz_scene_set_cnt_faac_byte_input_callback(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
view_dispatcher_send_custom_event(subghz->view_dispatcher, SubGhzCustomEventByteInputDone);
|
||||
}
|
||||
|
||||
void subghz_scene_set_cnt_faac_on_enter(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
// Setup view
|
||||
ByteInput* byte_input = subghz->byte_input;
|
||||
byte_input_set_header_text(byte_input, "Enter COUNTER in hex, 20bits");
|
||||
byte_input_set_result_callback(
|
||||
byte_input,
|
||||
subghz_scene_set_cnt_faac_byte_input_callback,
|
||||
NULL,
|
||||
subghz,
|
||||
subghz->txrx->secure_data->cnt,
|
||||
3);
|
||||
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdByteInput);
|
||||
}
|
||||
|
||||
bool subghz_scene_set_cnt_faac_on_event(void* context, SceneManagerEvent event) {
|
||||
SubGhz* subghz = context;
|
||||
bool consumed = false;
|
||||
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == SubGhzCustomEventByteInputDone) {
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSetSeedFaac);
|
||||
consumed = true;
|
||||
}
|
||||
}
|
||||
return consumed;
|
||||
}
|
||||
|
||||
void subghz_scene_set_cnt_faac_on_exit(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
// Clear view
|
||||
byte_input_set_result_callback(subghz->byte_input, NULL, NULL, NULL, NULL, 0);
|
||||
byte_input_set_header_text(subghz->byte_input, "");
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
#include "../subghz_i.h"
|
||||
|
||||
#define TAG "SubGhzSetFixBft"
|
||||
#define TAG "SubGhzSetFix"
|
||||
|
||||
void subghz_scene_set_fix_bft_byte_input_callback(void* context) {
|
||||
void subghz_scene_set_fix_byte_input_callback(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
view_dispatcher_send_custom_event(subghz->view_dispatcher, SubGhzCustomEventByteInputDone);
|
||||
}
|
||||
|
||||
void subghz_scene_set_fix_bft_on_enter(void* context) {
|
||||
void subghz_scene_set_fix_on_enter(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
// Setup view
|
||||
@@ -16,7 +16,7 @@ void subghz_scene_set_fix_bft_on_enter(void* context) {
|
||||
byte_input_set_header_text(byte_input, "Enter FIX in hex");
|
||||
byte_input_set_result_callback(
|
||||
byte_input,
|
||||
subghz_scene_set_fix_bft_byte_input_callback,
|
||||
subghz_scene_set_fix_byte_input_callback,
|
||||
NULL,
|
||||
subghz,
|
||||
subghz->txrx->secure_data->fix,
|
||||
@@ -24,20 +24,20 @@ void subghz_scene_set_fix_bft_on_enter(void* context) {
|
||||
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdByteInput);
|
||||
}
|
||||
|
||||
bool subghz_scene_set_fix_bft_on_event(void* context, SceneManagerEvent event) {
|
||||
bool subghz_scene_set_fix_on_event(void* context, SceneManagerEvent event) {
|
||||
SubGhz* subghz = context;
|
||||
bool consumed = false;
|
||||
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == SubGhzCustomEventByteInputDone) {
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSetCntBft);
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSetCnt);
|
||||
consumed = true;
|
||||
}
|
||||
}
|
||||
return consumed;
|
||||
}
|
||||
|
||||
void subghz_scene_set_fix_bft_on_exit(void* context) {
|
||||
void subghz_scene_set_fix_on_exit(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
// Clear view
|
||||
@@ -1,46 +0,0 @@
|
||||
#include "../subghz_i.h"
|
||||
|
||||
#define TAG "SubGhzSetFixFaac"
|
||||
|
||||
void subghz_scene_set_fix_faac_byte_input_callback(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
view_dispatcher_send_custom_event(subghz->view_dispatcher, SubGhzCustomEventByteInputDone);
|
||||
}
|
||||
|
||||
void subghz_scene_set_fix_faac_on_enter(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
// Setup view
|
||||
ByteInput* byte_input = subghz->byte_input;
|
||||
byte_input_set_header_text(byte_input, "Enter FIX in hex");
|
||||
byte_input_set_result_callback(
|
||||
byte_input,
|
||||
subghz_scene_set_fix_faac_byte_input_callback,
|
||||
NULL,
|
||||
subghz,
|
||||
subghz->txrx->secure_data->fix,
|
||||
4);
|
||||
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdByteInput);
|
||||
}
|
||||
|
||||
bool subghz_scene_set_fix_faac_on_event(void* context, SceneManagerEvent event) {
|
||||
SubGhz* subghz = context;
|
||||
bool consumed = false;
|
||||
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == SubGhzCustomEventByteInputDone) {
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSetCntFaac);
|
||||
consumed = true;
|
||||
}
|
||||
}
|
||||
return consumed;
|
||||
}
|
||||
|
||||
void subghz_scene_set_fix_faac_on_exit(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
// Clear view
|
||||
byte_input_set_result_callback(subghz->byte_input, NULL, NULL, NULL, NULL, 0);
|
||||
byte_input_set_header_text(subghz->byte_input, "");
|
||||
}
|
||||
168
applications/main/subghz/scenes/subghz_scene_set_seed.c
Normal file
168
applications/main/subghz/scenes/subghz_scene_set_seed.c
Normal file
@@ -0,0 +1,168 @@
|
||||
#include "../subghz_i.h"
|
||||
#include <lib/subghz/protocols/faac_slh.h>
|
||||
#include <lib/subghz/protocols/keeloq.h>
|
||||
|
||||
#define TAG "SubGhzSetSeed"
|
||||
|
||||
void subghz_scene_set_seed_byte_input_callback(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
view_dispatcher_send_custom_event(subghz->view_dispatcher, SubGhzCustomEventByteInputDone);
|
||||
}
|
||||
|
||||
void subghz_scene_set_seed_on_enter(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
// Setup view
|
||||
ByteInput* byte_input = subghz->byte_input;
|
||||
byte_input_set_header_text(byte_input, "Enter SEED in hex");
|
||||
byte_input_set_result_callback(
|
||||
byte_input,
|
||||
subghz_scene_set_seed_byte_input_callback,
|
||||
NULL,
|
||||
subghz,
|
||||
subghz->txrx->secure_data->seed,
|
||||
4);
|
||||
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdByteInput);
|
||||
}
|
||||
|
||||
bool subghz_scene_set_seed_on_event(void* context, SceneManagerEvent event) {
|
||||
SubGhz* subghz = context;
|
||||
bool consumed = false;
|
||||
bool generated_protocol = false;
|
||||
uint32_t fix_part, cnt, seed;
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == SubGhzCustomEventByteInputDone) {
|
||||
SubGhzCustomEvent state =
|
||||
scene_manager_get_scene_state(subghz->scene_manager, SubGhzSceneSetType);
|
||||
|
||||
switch(state) {
|
||||
case SubmenuIndexBFTClone:
|
||||
fix_part = subghz->txrx->secure_data->fix[0] << 24 |
|
||||
subghz->txrx->secure_data->fix[1] << 16 |
|
||||
subghz->txrx->secure_data->fix[2] << 8 |
|
||||
subghz->txrx->secure_data->fix[3];
|
||||
|
||||
cnt = subghz->txrx->secure_data->cnt[0] << 8 | subghz->txrx->secure_data->cnt[1];
|
||||
|
||||
seed = subghz->txrx->secure_data->seed[0] << 24 |
|
||||
subghz->txrx->secure_data->seed[1] << 16 |
|
||||
subghz->txrx->secure_data->seed[2] << 8 |
|
||||
subghz->txrx->secure_data->seed[3];
|
||||
|
||||
subghz->txrx->transmitter =
|
||||
subghz_transmitter_alloc_init(subghz->txrx->environment, "KeeLoq");
|
||||
if(subghz->txrx->transmitter) {
|
||||
subghz_preset_init(subghz, "AM650", 433920000, NULL, 0);
|
||||
subghz_protocol_keeloq_bft_create_data(
|
||||
subghz_transmitter_get_protocol_instance(subghz->txrx->transmitter),
|
||||
subghz->txrx->fff_data,
|
||||
fix_part & 0x0FFFFFFF,
|
||||
fix_part >> 28,
|
||||
cnt,
|
||||
seed,
|
||||
"BFT",
|
||||
subghz->txrx->preset);
|
||||
|
||||
uint8_t seed_data[sizeof(uint32_t)] = {0};
|
||||
for(size_t i = 0; i < sizeof(uint32_t); i++) {
|
||||
seed_data[sizeof(uint32_t) - i - 1] = (seed >> i * 8) & 0xFF;
|
||||
}
|
||||
|
||||
flipper_format_write_hex(
|
||||
subghz->txrx->fff_data, "Seed", seed_data, sizeof(uint32_t));
|
||||
|
||||
flipper_format_write_string_cstr(subghz->txrx->fff_data, "Manufacture", "BFT");
|
||||
|
||||
generated_protocol = true;
|
||||
}
|
||||
|
||||
subghz_transmitter_free(subghz->txrx->transmitter);
|
||||
|
||||
if(!generated_protocol) {
|
||||
furi_string_set(
|
||||
subghz->error_str, "Function requires\nan SD card with\nfresh databases.");
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowError);
|
||||
}
|
||||
consumed = true;
|
||||
break;
|
||||
case SubmenuIndexFaacSLH_433:
|
||||
case SubmenuIndexFaacSLH_868:
|
||||
fix_part = subghz->txrx->secure_data->fix[0] << 24 |
|
||||
subghz->txrx->secure_data->fix[1] << 16 |
|
||||
subghz->txrx->secure_data->fix[2] << 8 |
|
||||
subghz->txrx->secure_data->fix[3];
|
||||
|
||||
cnt = subghz->txrx->secure_data->cnt[0] << 16 |
|
||||
subghz->txrx->secure_data->cnt[1] << 8 | subghz->txrx->secure_data->cnt[2];
|
||||
|
||||
seed = subghz->txrx->secure_data->seed[0] << 24 |
|
||||
subghz->txrx->secure_data->seed[1] << 16 |
|
||||
subghz->txrx->secure_data->seed[2] << 8 |
|
||||
subghz->txrx->secure_data->seed[3];
|
||||
|
||||
subghz->txrx->transmitter =
|
||||
subghz_transmitter_alloc_init(subghz->txrx->environment, "Faac SLH");
|
||||
if(subghz->txrx->transmitter) {
|
||||
SubGhzCustomEvent state =
|
||||
scene_manager_get_scene_state(subghz->scene_manager, SubGhzSceneSetType);
|
||||
|
||||
if(state == SubmenuIndexFaacSLH_433) {
|
||||
subghz_preset_init(subghz, "AM650", 433920000, NULL, 0);
|
||||
} else if(state == SubmenuIndexFaacSLH_868) {
|
||||
subghz_preset_init(subghz, "AM650", 868350000, NULL, 0);
|
||||
}
|
||||
subghz_protocol_faac_slh_create_data(
|
||||
subghz_transmitter_get_protocol_instance(subghz->txrx->transmitter),
|
||||
subghz->txrx->fff_data,
|
||||
fix_part >> 4,
|
||||
fix_part & 0xf,
|
||||
(cnt & 0xFFFFF),
|
||||
seed,
|
||||
"FAAC_SLH",
|
||||
subghz->txrx->preset);
|
||||
// RogueMaster dont steal!
|
||||
uint8_t seed_data[sizeof(uint32_t)] = {0};
|
||||
for(size_t i = 0; i < sizeof(uint32_t); i++) {
|
||||
seed_data[sizeof(uint32_t) - i - 1] = (seed >> i * 8) & 0xFF;
|
||||
}
|
||||
|
||||
flipper_format_write_hex(
|
||||
subghz->txrx->fff_data, "Seed", seed_data, sizeof(uint32_t));
|
||||
|
||||
generated_protocol = true;
|
||||
}
|
||||
|
||||
subghz_transmitter_free(subghz->txrx->transmitter);
|
||||
|
||||
if(!generated_protocol) {
|
||||
furi_string_set(
|
||||
subghz->error_str, "Function requires\nan SD card with\nfresh databases.");
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowError);
|
||||
}
|
||||
consumed = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(generated_protocol) {
|
||||
subghz_file_name_clear(subghz);
|
||||
scene_manager_set_scene_state(
|
||||
subghz->scene_manager, SubGhzSceneSetType, SubGhzCustomEventManagerSet);
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSaveName);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return consumed;
|
||||
}
|
||||
|
||||
void subghz_scene_set_seed_on_exit(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
// Clear view
|
||||
byte_input_set_result_callback(subghz->byte_input, NULL, NULL, NULL, NULL, 0);
|
||||
byte_input_set_header_text(subghz->byte_input, "");
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
#include "../subghz_i.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
#include <lib/subghz/protocols/keeloq.h>
|
||||
|
||||
#define TAG "SubGhzSetSeedBft"
|
||||
|
||||
void subghz_scene_set_seed_bft_byte_input_callback(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
view_dispatcher_send_custom_event(subghz->view_dispatcher, SubGhzCustomEventByteInputDone);
|
||||
}
|
||||
|
||||
void subghz_scene_set_seed_bft_on_enter(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
// Setup view
|
||||
// RogueMaster don't steal!!!
|
||||
ByteInput* byte_input = subghz->byte_input;
|
||||
byte_input_set_header_text(byte_input, "Enter SEED in hex");
|
||||
byte_input_set_result_callback(
|
||||
byte_input,
|
||||
subghz_scene_set_seed_bft_byte_input_callback,
|
||||
NULL,
|
||||
subghz,
|
||||
subghz->txrx->secure_data->seed,
|
||||
4);
|
||||
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdByteInput);
|
||||
}
|
||||
|
||||
bool subghz_scene_set_seed_bft_on_event(void* context, SceneManagerEvent event) {
|
||||
SubGhz* subghz = context;
|
||||
bool consumed = false;
|
||||
bool generated_protocol = false;
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == SubGhzCustomEventByteInputDone) {
|
||||
uint32_t fix_part =
|
||||
subghz->txrx->secure_data->fix[0] << 24 | subghz->txrx->secure_data->fix[1] << 16 |
|
||||
subghz->txrx->secure_data->fix[2] << 8 | subghz->txrx->secure_data->fix[3];
|
||||
|
||||
uint16_t cnt = subghz->txrx->secure_data->cnt[0] << 8 |
|
||||
subghz->txrx->secure_data->cnt[1];
|
||||
|
||||
uint32_t seed = subghz->txrx->secure_data->seed[0] << 24 |
|
||||
subghz->txrx->secure_data->seed[1] << 16 |
|
||||
subghz->txrx->secure_data->seed[2] << 8 |
|
||||
subghz->txrx->secure_data->seed[3];
|
||||
|
||||
subghz->txrx->transmitter =
|
||||
subghz_transmitter_alloc_init(subghz->txrx->environment, "KeeLoq");
|
||||
if(subghz->txrx->transmitter) {
|
||||
subghz_preset_init(subghz, "AM650", 433920000, NULL, 0);
|
||||
subghz_protocol_keeloq_bft_create_data(
|
||||
subghz_transmitter_get_protocol_instance(subghz->txrx->transmitter),
|
||||
subghz->txrx->fff_data,
|
||||
fix_part & 0x0FFFFFFF,
|
||||
fix_part >> 28,
|
||||
cnt,
|
||||
seed,
|
||||
"BFT",
|
||||
subghz->txrx->preset);
|
||||
|
||||
uint8_t seed_data[sizeof(uint32_t)] = {0};
|
||||
for(size_t i = 0; i < sizeof(uint32_t); i++) {
|
||||
seed_data[sizeof(uint32_t) - i - 1] = (seed >> i * 8) & 0xFF;
|
||||
}
|
||||
|
||||
flipper_format_write_hex(
|
||||
subghz->txrx->fff_data, "Seed", seed_data, sizeof(uint32_t));
|
||||
|
||||
flipper_format_write_string_cstr(subghz->txrx->fff_data, "Manufacture", "BFT");
|
||||
|
||||
generated_protocol = true;
|
||||
} else {
|
||||
generated_protocol = false;
|
||||
}
|
||||
|
||||
subghz_transmitter_free(subghz->txrx->transmitter);
|
||||
|
||||
if(!generated_protocol) {
|
||||
furi_string_set(
|
||||
subghz->error_str, "Function requires\nan SD card with\nfresh databases.");
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowError);
|
||||
}
|
||||
consumed = true;
|
||||
}
|
||||
|
||||
if(generated_protocol) {
|
||||
subghz_file_name_clear(subghz);
|
||||
DOLPHIN_DEED(DolphinDeedSubGhzAddManually);
|
||||
scene_manager_set_scene_state(
|
||||
subghz->scene_manager, SubGhzSceneSetType, SubGhzCustomEventManagerSet);
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSaveName);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return consumed;
|
||||
}
|
||||
|
||||
void subghz_scene_set_seed_bft_on_exit(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
// Clear view
|
||||
byte_input_set_result_callback(subghz->byte_input, NULL, NULL, NULL, NULL, 0);
|
||||
byte_input_set_header_text(subghz->byte_input, "");
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
#include "../subghz_i.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
#include <lib/subghz/protocols/faac_slh.h>
|
||||
|
||||
#define TAG "SubGhzSetSeedFaac"
|
||||
|
||||
void subghz_scene_set_seed_faac_byte_input_callback(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
view_dispatcher_send_custom_event(subghz->view_dispatcher, SubGhzCustomEventByteInputDone);
|
||||
}
|
||||
|
||||
void subghz_scene_set_seed_faac_on_enter(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
// Setup view
|
||||
ByteInput* byte_input = subghz->byte_input;
|
||||
byte_input_set_header_text(byte_input, "Enter SEED in hex");
|
||||
byte_input_set_result_callback(
|
||||
byte_input,
|
||||
subghz_scene_set_seed_faac_byte_input_callback,
|
||||
NULL,
|
||||
subghz,
|
||||
subghz->txrx->secure_data->seed,
|
||||
4);
|
||||
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdByteInput);
|
||||
}
|
||||
|
||||
bool subghz_scene_set_seed_faac_on_event(void* context, SceneManagerEvent event) {
|
||||
SubGhz* subghz = context;
|
||||
bool consumed = false;
|
||||
bool generated_protocol = false;
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == SubGhzCustomEventByteInputDone) {
|
||||
uint32_t fix_part =
|
||||
subghz->txrx->secure_data->fix[0] << 24 | subghz->txrx->secure_data->fix[1] << 16 |
|
||||
subghz->txrx->secure_data->fix[2] << 8 | subghz->txrx->secure_data->fix[3];
|
||||
|
||||
uint32_t cnt = subghz->txrx->secure_data->cnt[0] << 16 |
|
||||
subghz->txrx->secure_data->cnt[1] << 8 |
|
||||
subghz->txrx->secure_data->cnt[2];
|
||||
|
||||
uint32_t seed = subghz->txrx->secure_data->seed[0] << 24 |
|
||||
subghz->txrx->secure_data->seed[1] << 16 |
|
||||
subghz->txrx->secure_data->seed[2] << 8 |
|
||||
subghz->txrx->secure_data->seed[3];
|
||||
|
||||
subghz->txrx->transmitter =
|
||||
subghz_transmitter_alloc_init(subghz->txrx->environment, "Faac SLH");
|
||||
if(subghz->txrx->transmitter) {
|
||||
SubGhzCustomEvent state =
|
||||
scene_manager_get_scene_state(subghz->scene_manager, SubGhzSceneSetType);
|
||||
|
||||
if(state == SubmenuIndexFaacSLH_433) {
|
||||
subghz_preset_init(subghz, "AM650", 433920000, NULL, 0);
|
||||
} else if(state == SubmenuIndexFaacSLH_868) {
|
||||
subghz_preset_init(subghz, "AM650", 868350000, NULL, 0);
|
||||
}
|
||||
subghz_protocol_faac_slh_create_data(
|
||||
subghz_transmitter_get_protocol_instance(subghz->txrx->transmitter),
|
||||
subghz->txrx->fff_data,
|
||||
fix_part >> 4,
|
||||
fix_part & 0xf,
|
||||
(cnt & 0xFFFFF),
|
||||
seed,
|
||||
"FAAC_SLH",
|
||||
subghz->txrx->preset);
|
||||
// RogueMaster dont steal!
|
||||
uint8_t seed_data[sizeof(uint32_t)] = {0};
|
||||
for(size_t i = 0; i < sizeof(uint32_t); i++) {
|
||||
seed_data[sizeof(uint32_t) - i - 1] = (seed >> i * 8) & 0xFF;
|
||||
}
|
||||
|
||||
flipper_format_write_hex(
|
||||
subghz->txrx->fff_data, "Seed", seed_data, sizeof(uint32_t));
|
||||
|
||||
generated_protocol = true;
|
||||
} else {
|
||||
generated_protocol = false;
|
||||
}
|
||||
|
||||
subghz_transmitter_free(subghz->txrx->transmitter);
|
||||
|
||||
if(!generated_protocol) {
|
||||
furi_string_set(
|
||||
subghz->error_str, "Function requires\nan SD card with\nfresh databases.");
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowError);
|
||||
}
|
||||
consumed = true;
|
||||
}
|
||||
|
||||
if(generated_protocol) {
|
||||
subghz_file_name_clear(subghz);
|
||||
DOLPHIN_DEED(DolphinDeedSubGhzAddManually);
|
||||
scene_manager_set_scene_state(
|
||||
subghz->scene_manager, SubGhzSceneSetType, SubGhzCustomEventManagerSet);
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSaveName);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return consumed;
|
||||
}
|
||||
|
||||
void subghz_scene_set_seed_faac_on_exit(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
// Clear view
|
||||
byte_input_set_result_callback(subghz->byte_input, NULL, NULL, NULL, NULL, 0);
|
||||
byte_input_set_header_text(subghz->byte_input, "");
|
||||
}
|
||||
@@ -105,6 +105,8 @@ void subghz_scene_set_type_submenu_callback(void* context, uint32_t index) {
|
||||
void subghz_scene_set_type_on_enter(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
subghz->from_add_manually = true;
|
||||
|
||||
submenu_add_item(
|
||||
subghz->submenu,
|
||||
"Faac SLH 868MHz",
|
||||
@@ -389,13 +391,13 @@ bool subghz_scene_set_type_on_event(void* context, SceneManagerEvent event) {
|
||||
uint32_t key = subghz_random_serial();
|
||||
switch(event.event) {
|
||||
case SubmenuIndexFaacSLH_868:
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSetFixFaac);
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSetFix);
|
||||
break;
|
||||
case SubmenuIndexFaacSLH_433:
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSetFixFaac);
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSetFix);
|
||||
break;
|
||||
case SubmenuIndexBFTClone:
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSetFixBft);
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSetFix);
|
||||
break;
|
||||
case SubmenuIndexPricenton:
|
||||
key = (key & 0x00FFFFF0) | 0x4; //btn 0x1, 0x2, 0x4, 0x8
|
||||
|
||||
@@ -72,6 +72,7 @@ SubGhz* subghz_alloc(bool alloc_for_tx_only) {
|
||||
|
||||
subghz->in_decoder_scene = false;
|
||||
subghz->in_decoder_scene_skip = false;
|
||||
subghz->from_add_manually = false;
|
||||
|
||||
// View Dispatcher
|
||||
subghz->view_dispatcher = view_dispatcher_alloc();
|
||||
|
||||
@@ -127,6 +127,7 @@ struct SubGhz {
|
||||
|
||||
bool in_decoder_scene;
|
||||
bool in_decoder_scene_skip;
|
||||
bool from_add_manually;
|
||||
|
||||
SubGhzDecodeRawState decode_raw_state;
|
||||
SubGhzFileEncoderWorker* decode_raw_file_worker_encoder;
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include <assets_icons.h>
|
||||
#include <locale/locale.h>
|
||||
|
||||
#define LOW_CHARGE_THRESHOLD (10)
|
||||
#define HIGH_DRAIN_CURRENT_THRESHOLD (-100)
|
||||
#define LOW_CHARGE_THRESHOLD 10
|
||||
#define HIGH_DRAIN_CURRENT_THRESHOLD 100
|
||||
|
||||
struct BatteryInfo {
|
||||
View* view;
|
||||
@@ -25,13 +25,14 @@ static void draw_battery(Canvas* canvas, BatteryInfoModel* data, int x, int y) {
|
||||
char header[20] = {};
|
||||
char value[20] = {};
|
||||
|
||||
int32_t current = 1000.0f * data->gauge_current;
|
||||
int32_t drain_current = data->gauge_current * (-1000);
|
||||
uint32_t charge_current = data->gauge_current * 1000;
|
||||
|
||||
// Draw battery
|
||||
canvas_draw_icon(canvas, x, y, &I_BatteryBody_52x28);
|
||||
if(current > 0) {
|
||||
if(charge_current > 0) {
|
||||
canvas_draw_icon(canvas, x + 16, y + 7, &I_FaceCharging_29x14);
|
||||
} else if(current < HIGH_DRAIN_CURRENT_THRESHOLD) {
|
||||
} else if(drain_current > HIGH_DRAIN_CURRENT_THRESHOLD) {
|
||||
canvas_draw_icon(canvas, x + 16, y + 7, &I_FaceConfused_29x14);
|
||||
} else if(data->charge < LOW_CHARGE_THRESHOLD) {
|
||||
canvas_draw_icon(canvas, x + 16, y + 7, &I_FaceNopower_29x14);
|
||||
@@ -43,7 +44,7 @@ static void draw_battery(Canvas* canvas, BatteryInfoModel* data, int x, int y) {
|
||||
elements_bubble(canvas, 53, 0, 71, 39);
|
||||
|
||||
// Set text
|
||||
if(current > 0) {
|
||||
if(charge_current > 0) {
|
||||
snprintf(emote, sizeof(emote), "%s", "Yummy!");
|
||||
snprintf(header, sizeof(header), "%s", "Charging at");
|
||||
snprintf(
|
||||
@@ -52,22 +53,23 @@ static void draw_battery(Canvas* canvas, BatteryInfoModel* data, int x, int y) {
|
||||
"%lu.%luV %lumA",
|
||||
(uint32_t)(data->vbus_voltage),
|
||||
(uint32_t)(data->vbus_voltage * 10) % 10,
|
||||
current);
|
||||
} else if(current < 0) {
|
||||
charge_current);
|
||||
} else if(drain_current > 0) {
|
||||
snprintf(
|
||||
emote,
|
||||
sizeof(emote),
|
||||
"%s",
|
||||
current < HIGH_DRAIN_CURRENT_THRESHOLD ? "Oh no!" : "Om-nom-nom!");
|
||||
drain_current > HIGH_DRAIN_CURRENT_THRESHOLD ? "Oh no!" : "Om-nom-nom!");
|
||||
snprintf(header, sizeof(header), "%s", "Consumption is");
|
||||
snprintf(
|
||||
value,
|
||||
sizeof(value),
|
||||
"%ld %s",
|
||||
ABS(current),
|
||||
current < HIGH_DRAIN_CURRENT_THRESHOLD ? "mA!" : "mA");
|
||||
} else if(data->vbus_voltage > 0) {
|
||||
if(data->charge_voltage_limit < 4.2) {
|
||||
drain_current,
|
||||
drain_current > HIGH_DRAIN_CURRENT_THRESHOLD ? "mA!" : "mA");
|
||||
} else if(drain_current != 0) {
|
||||
snprintf(header, 20, "...");
|
||||
} else if(data->charge_voltage_limit < 4.2) {
|
||||
// Non-default battery charging limit, mention it
|
||||
snprintf(emote, sizeof(emote), "Charged!");
|
||||
snprintf(header, sizeof(header), "Limited to");
|
||||
@@ -80,9 +82,6 @@ static void draw_battery(Canvas* canvas, BatteryInfoModel* data, int x, int y) {
|
||||
} else {
|
||||
snprintf(header, sizeof(header), "Charged!");
|
||||
}
|
||||
} else {
|
||||
snprintf(header, sizeof(header), "Napping...");
|
||||
}
|
||||
|
||||
canvas_draw_str_aligned(canvas, 92, y + 3, AlignCenter, AlignCenter, emote);
|
||||
canvas_draw_str_aligned(canvas, 92, y + 15, AlignCenter, AlignCenter, header);
|
||||
|
||||
@@ -141,21 +141,6 @@ static void hand_orient_changed(VariableItem* item) {
|
||||
loader_update_menu();
|
||||
}
|
||||
|
||||
const char* const sleep_method[] = {
|
||||
"Default",
|
||||
"Legacy",
|
||||
};
|
||||
|
||||
static void sleep_method_changed(VariableItem* item) {
|
||||
uint8_t index = variable_item_get_current_value_index(item);
|
||||
variable_item_set_current_value_text(item, sleep_method[index]);
|
||||
if(index) {
|
||||
furi_hal_rtc_set_flag(FuriHalRtcFlagLegacySleep);
|
||||
} else {
|
||||
furi_hal_rtc_reset_flag(FuriHalRtcFlagLegacySleep);
|
||||
}
|
||||
}
|
||||
|
||||
static uint32_t system_settings_exit(void* context) {
|
||||
UNUSED(context);
|
||||
return VIEW_NONE;
|
||||
@@ -233,12 +218,6 @@ SystemSettings* system_settings_alloc() {
|
||||
variable_item_set_current_value_index(item, value_index);
|
||||
variable_item_set_current_value_text(item, heap_trace_mode_text[value_index]);
|
||||
|
||||
item = variable_item_list_add(
|
||||
app->var_item_list, "Sleep Method", COUNT_OF(sleep_method), sleep_method_changed, app);
|
||||
value_index = furi_hal_rtc_is_flag_set(FuriHalRtcFlagLegacySleep) ? 1 : 0;
|
||||
variable_item_set_current_value_index(item, value_index);
|
||||
variable_item_set_current_value_text(item, sleep_method[value_index]);
|
||||
|
||||
view_set_previous_callback(
|
||||
variable_item_list_get_view(app->var_item_list), system_settings_exit);
|
||||
view_dispatcher_add_view(
|
||||
|
||||
@@ -135,7 +135,6 @@ class FlipperAppStateHelper:
|
||||
self.app_list_ptr = None
|
||||
self.app_list_entry_type = None
|
||||
self._current_apps: list[AppState] = []
|
||||
self.set_debug_mode(True)
|
||||
|
||||
def _walk_app_list(self, list_head):
|
||||
while list_head:
|
||||
@@ -196,7 +195,7 @@ class FlipperAppStateHelper:
|
||||
self.set_debug_mode(False)
|
||||
|
||||
def set_debug_mode(self, mode: bool) -> None:
|
||||
gdb.execute(f"set variable furi_hal_debug_gdb_session_active = {int(mode)}")
|
||||
gdb.execute(f"set variable fap_loader_debug_active = {int(mode)}")
|
||||
|
||||
|
||||
# Init additional 'fap-set-debug-elf-root' command and set up hooks
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# Furi HAL Debugging
|
||||
|
||||
Some Furi subsystem got additional debugging features that can be enabled by adding additional defines to firmware compilation.
|
||||
Usually they are used for low level tracing and profiling or signal redirection/duplication.
|
||||
|
||||
|
||||
## FuriHalOs
|
||||
|
||||
`--extra-define=FURI_HAL_OS_DEBUG` enables tick, tick suppression, idle and time flow.
|
||||
|
||||
There are 3 signals that will be exposed to external GPIO pins:
|
||||
|
||||
- `AWAKE` - `PA7` - High when system is busy with computations, low when sleeping. Can be used to track transitions to sleep mode.
|
||||
- `TICK` - `PA6` - Flipped on system tick, only flips when no tick suppression in progress. Can be used to track tick skew and abnormal task scheduling.
|
||||
- `SECOND` - `PA4` - Flipped each second. Can be used for tracing RT issue: time flow disturbance means system doesn't conforms Hard RT.
|
||||
|
||||
|
||||
|
||||
## FuriHalPower
|
||||
|
||||
`--extra-define=FURI_HAL_POWER_DEBUG` enables power subsystem mode transitions tracing.
|
||||
|
||||
There are 2 signals that will be exposed to external GPIO pins:
|
||||
|
||||
- `WFI` - `PB2` - Light sleep (wait for interrupt) used. Basically this is lightest and most non-breaking things power save mode. All function and debug should work correctly in this mode.
|
||||
- `STOP` - `PC3` - STOP mode used. Platform deep sleep mode. Extremely fragile mode where most of the silicon is disabled or in unusable state. Debugging MCU in this mode is nearly impossible.
|
||||
@@ -23,7 +23,7 @@ after that on web updater page - press `Connect` button
|
||||
- And wait, if all flashed successfully - you will have all needed assets pre installed
|
||||
- Done
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
<br>
|
||||
@@ -41,7 +41,8 @@ after that on web updater page - press `Connect` button
|
||||
- And if all flashed successfully - you will have all needed assets pre installed
|
||||
- Done
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
<br>
|
||||
<br>
|
||||
@@ -74,7 +75,8 @@ after that on web updater page - press `Connect` button
|
||||
- And if all flashed successfully - you will have all needed assets pre installed
|
||||
- Done
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
<br>
|
||||
<br>
|
||||
@@ -92,7 +94,8 @@ after that on web updater page - press `Connect` button
|
||||
- And wait, if all flashed successfully - you will have all needed assets pre installed
|
||||
- Done
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
<br>
|
||||
<br>
|
||||
@@ -111,7 +114,8 @@ after that on web updater page - press `Connect` button
|
||||
- Update will start, wait for all stages
|
||||
- Done
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
@@ -105,7 +105,6 @@ To run cleanup (think of `make clean`) for specified targets, add the `-c` optio
|
||||
- `--options optionfile.py` (default value `fbt_options.py`) - load a file with multiple configuration values
|
||||
- `--extra-int-apps=app1,app2,appN` - force listed apps to be built as internal with the `firmware` target
|
||||
- `--extra-ext-apps=app1,app2,appN` - force listed apps to be built as external with the `firmware_extapps` target
|
||||
- `--extra-define=A --extra-define=B=C ` - extra global defines that will be passed to the C/C++ compiler, can be specified multiple times
|
||||
- `--proxy-env=VAR1,VAR2` - additional environment variables to expose to subprocesses spawned by `fbt`. By default, `fbt` sanitizes the execution environment and doesn't forward all inherited environment variables. You can find the list of variables that are always forwarded in the `environ.scons` file.
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -20,7 +20,7 @@ DIST_SUFFIX = "local"
|
||||
COPRO_OB_DATA = "scripts/ob.data"
|
||||
|
||||
# Must match lib/STM32CubeWB version
|
||||
COPRO_CUBE_VERSION = "1.16.0"
|
||||
COPRO_CUBE_VERSION = "1.13.3"
|
||||
|
||||
COPRO_CUBE_DIR = "lib/STM32CubeWB"
|
||||
|
||||
|
||||
@@ -176,17 +176,17 @@ Header,+,lib/toolbox/tar/tar_archive.h,,
|
||||
Header,+,lib/toolbox/value_index.h,,
|
||||
Header,+,lib/toolbox/version.h,,
|
||||
Function,-,LL_ADC_CommonDeInit,ErrorStatus,ADC_Common_TypeDef*
|
||||
Function,-,LL_ADC_CommonInit,ErrorStatus,"ADC_Common_TypeDef*, const LL_ADC_CommonInitTypeDef*"
|
||||
Function,-,LL_ADC_CommonInit,ErrorStatus,"ADC_Common_TypeDef*, LL_ADC_CommonInitTypeDef*"
|
||||
Function,-,LL_ADC_CommonStructInit,void,LL_ADC_CommonInitTypeDef*
|
||||
Function,-,LL_ADC_DeInit,ErrorStatus,ADC_TypeDef*
|
||||
Function,-,LL_ADC_INJ_Init,ErrorStatus,"ADC_TypeDef*, const LL_ADC_INJ_InitTypeDef*"
|
||||
Function,-,LL_ADC_INJ_Init,ErrorStatus,"ADC_TypeDef*, LL_ADC_INJ_InitTypeDef*"
|
||||
Function,-,LL_ADC_INJ_StructInit,void,LL_ADC_INJ_InitTypeDef*
|
||||
Function,-,LL_ADC_Init,ErrorStatus,"ADC_TypeDef*, const LL_ADC_InitTypeDef*"
|
||||
Function,-,LL_ADC_REG_Init,ErrorStatus,"ADC_TypeDef*, const LL_ADC_REG_InitTypeDef*"
|
||||
Function,-,LL_ADC_Init,ErrorStatus,"ADC_TypeDef*, LL_ADC_InitTypeDef*"
|
||||
Function,-,LL_ADC_REG_Init,ErrorStatus,"ADC_TypeDef*, LL_ADC_REG_InitTypeDef*"
|
||||
Function,-,LL_ADC_REG_StructInit,void,LL_ADC_REG_InitTypeDef*
|
||||
Function,-,LL_ADC_StructInit,void,LL_ADC_InitTypeDef*
|
||||
Function,-,LL_COMP_DeInit,ErrorStatus,COMP_TypeDef*
|
||||
Function,+,LL_COMP_Init,ErrorStatus,"COMP_TypeDef*, const LL_COMP_InitTypeDef*"
|
||||
Function,+,LL_COMP_Init,ErrorStatus,"COMP_TypeDef*, LL_COMP_InitTypeDef*"
|
||||
Function,-,LL_COMP_StructInit,void,LL_COMP_InitTypeDef*
|
||||
Function,-,LL_CRC_DeInit,ErrorStatus,CRC_TypeDef*
|
||||
Function,-,LL_CRS_DeInit,ErrorStatus,
|
||||
@@ -199,16 +199,16 @@ Function,-,LL_EXTI_StructInit,void,LL_EXTI_InitTypeDef*
|
||||
Function,-,LL_GPIO_DeInit,ErrorStatus,GPIO_TypeDef*
|
||||
Function,+,LL_GPIO_Init,ErrorStatus,"GPIO_TypeDef*, LL_GPIO_InitTypeDef*"
|
||||
Function,-,LL_GPIO_StructInit,void,LL_GPIO_InitTypeDef*
|
||||
Function,-,LL_I2C_DeInit,ErrorStatus,const I2C_TypeDef*
|
||||
Function,+,LL_I2C_Init,ErrorStatus,"I2C_TypeDef*, const LL_I2C_InitTypeDef*"
|
||||
Function,-,LL_I2C_DeInit,ErrorStatus,I2C_TypeDef*
|
||||
Function,+,LL_I2C_Init,ErrorStatus,"I2C_TypeDef*, LL_I2C_InitTypeDef*"
|
||||
Function,-,LL_I2C_StructInit,void,LL_I2C_InitTypeDef*
|
||||
Function,-,LL_Init1msTick,void,uint32_t
|
||||
Function,+,LL_LPTIM_DeInit,ErrorStatus,LPTIM_TypeDef*
|
||||
Function,-,LL_LPTIM_Disable,void,LPTIM_TypeDef*
|
||||
Function,+,LL_LPTIM_Init,ErrorStatus,"LPTIM_TypeDef*, const LL_LPTIM_InitTypeDef*"
|
||||
Function,+,LL_LPTIM_Init,ErrorStatus,"LPTIM_TypeDef*, LL_LPTIM_InitTypeDef*"
|
||||
Function,-,LL_LPTIM_StructInit,void,LL_LPTIM_InitTypeDef*
|
||||
Function,-,LL_LPUART_DeInit,ErrorStatus,const USART_TypeDef*
|
||||
Function,+,LL_LPUART_Init,ErrorStatus,"USART_TypeDef*, const LL_LPUART_InitTypeDef*"
|
||||
Function,-,LL_LPUART_DeInit,ErrorStatus,USART_TypeDef*
|
||||
Function,+,LL_LPUART_Init,ErrorStatus,"USART_TypeDef*, LL_LPUART_InitTypeDef*"
|
||||
Function,-,LL_LPUART_StructInit,void,LL_LPUART_InitTypeDef*
|
||||
Function,-,LL_PKA_DeInit,ErrorStatus,PKA_TypeDef*
|
||||
Function,-,LL_PKA_Init,ErrorStatus,"PKA_TypeDef*, LL_PKA_InitTypeDef*"
|
||||
@@ -253,23 +253,23 @@ Function,+,LL_SPI_Init,ErrorStatus,"SPI_TypeDef*, LL_SPI_InitTypeDef*"
|
||||
Function,-,LL_SPI_StructInit,void,LL_SPI_InitTypeDef*
|
||||
Function,-,LL_SetFlashLatency,ErrorStatus,uint32_t
|
||||
Function,+,LL_SetSystemCoreClock,void,uint32_t
|
||||
Function,-,LL_TIM_BDTR_Init,ErrorStatus,"TIM_TypeDef*, const LL_TIM_BDTR_InitTypeDef*"
|
||||
Function,-,LL_TIM_BDTR_Init,ErrorStatus,"TIM_TypeDef*, LL_TIM_BDTR_InitTypeDef*"
|
||||
Function,-,LL_TIM_BDTR_StructInit,void,LL_TIM_BDTR_InitTypeDef*
|
||||
Function,-,LL_TIM_DeInit,ErrorStatus,TIM_TypeDef*
|
||||
Function,-,LL_TIM_ENCODER_Init,ErrorStatus,"TIM_TypeDef*, const LL_TIM_ENCODER_InitTypeDef*"
|
||||
Function,+,LL_TIM_DeInit,ErrorStatus,TIM_TypeDef*
|
||||
Function,-,LL_TIM_ENCODER_Init,ErrorStatus,"TIM_TypeDef*, LL_TIM_ENCODER_InitTypeDef*"
|
||||
Function,-,LL_TIM_ENCODER_StructInit,void,LL_TIM_ENCODER_InitTypeDef*
|
||||
Function,-,LL_TIM_HALLSENSOR_Init,ErrorStatus,"TIM_TypeDef*, const LL_TIM_HALLSENSOR_InitTypeDef*"
|
||||
Function,-,LL_TIM_HALLSENSOR_Init,ErrorStatus,"TIM_TypeDef*, LL_TIM_HALLSENSOR_InitTypeDef*"
|
||||
Function,-,LL_TIM_HALLSENSOR_StructInit,void,LL_TIM_HALLSENSOR_InitTypeDef*
|
||||
Function,-,LL_TIM_IC_Init,ErrorStatus,"TIM_TypeDef*, uint32_t, const LL_TIM_IC_InitTypeDef*"
|
||||
Function,-,LL_TIM_IC_Init,ErrorStatus,"TIM_TypeDef*, uint32_t, LL_TIM_IC_InitTypeDef*"
|
||||
Function,-,LL_TIM_IC_StructInit,void,LL_TIM_IC_InitTypeDef*
|
||||
Function,+,LL_TIM_Init,ErrorStatus,"TIM_TypeDef*, const LL_TIM_InitTypeDef*"
|
||||
Function,+,LL_TIM_OC_Init,ErrorStatus,"TIM_TypeDef*, uint32_t, const LL_TIM_OC_InitTypeDef*"
|
||||
Function,+,LL_TIM_Init,ErrorStatus,"TIM_TypeDef*, LL_TIM_InitTypeDef*"
|
||||
Function,+,LL_TIM_OC_Init,ErrorStatus,"TIM_TypeDef*, uint32_t, LL_TIM_OC_InitTypeDef*"
|
||||
Function,-,LL_TIM_OC_StructInit,void,LL_TIM_OC_InitTypeDef*
|
||||
Function,-,LL_TIM_StructInit,void,LL_TIM_InitTypeDef*
|
||||
Function,-,LL_USART_ClockInit,ErrorStatus,"USART_TypeDef*, const LL_USART_ClockInitTypeDef*"
|
||||
Function,-,LL_USART_ClockInit,ErrorStatus,"USART_TypeDef*, LL_USART_ClockInitTypeDef*"
|
||||
Function,-,LL_USART_ClockStructInit,void,LL_USART_ClockInitTypeDef*
|
||||
Function,-,LL_USART_DeInit,ErrorStatus,const USART_TypeDef*
|
||||
Function,+,LL_USART_Init,ErrorStatus,"USART_TypeDef*, const LL_USART_InitTypeDef*"
|
||||
Function,-,LL_USART_DeInit,ErrorStatus,USART_TypeDef*
|
||||
Function,+,LL_USART_Init,ErrorStatus,"USART_TypeDef*, LL_USART_InitTypeDef*"
|
||||
Function,-,LL_USART_StructInit,void,LL_USART_InitTypeDef*
|
||||
Function,-,LL_mDelay,void,uint32_t
|
||||
Function,-,SystemCoreClockUpdate,void,
|
||||
@@ -901,7 +901,6 @@ Function,+,furi_hal_crypto_verify_enclave,_Bool,"uint8_t*, uint8_t*"
|
||||
Function,+,furi_hal_crypto_verify_key,_Bool,uint8_t
|
||||
Function,+,furi_hal_debug_disable,void,
|
||||
Function,+,furi_hal_debug_enable,void,
|
||||
Function,+,furi_hal_debug_is_gdb_session_active,_Bool,
|
||||
Function,-,furi_hal_deinit_early,void,
|
||||
Function,-,furi_hal_flash_erase,void,uint8_t
|
||||
Function,-,furi_hal_flash_get_base,size_t,
|
||||
@@ -984,6 +983,7 @@ Function,-,furi_hal_os_init,void,
|
||||
Function,+,furi_hal_os_tick,void,
|
||||
Function,+,furi_hal_power_check_otg_status,void,
|
||||
Function,+,furi_hal_power_debug_get,void,"PropertyValueCallback, void*"
|
||||
Function,+,furi_hal_power_deep_sleep_available,_Bool,
|
||||
Function,+,furi_hal_power_disable_external_3_3v,void,
|
||||
Function,+,furi_hal_power_disable_otg,void,
|
||||
Function,+,furi_hal_power_enable_external_3_3v,void,
|
||||
@@ -1059,7 +1059,6 @@ Function,+,furi_hal_rtc_set_locale_units,void,FuriHalRtcLocaleUnits
|
||||
Function,+,furi_hal_rtc_set_log_level,void,uint8_t
|
||||
Function,+,furi_hal_rtc_set_pin_fails,void,uint32_t
|
||||
Function,+,furi_hal_rtc_set_register,void,"FuriHalRtcRegister, uint32_t"
|
||||
Function,+,furi_hal_rtc_sync_shadow,void,
|
||||
Function,+,furi_hal_rtc_validate_datetime,_Bool,FuriHalRtcDateTime*
|
||||
Function,+,furi_hal_speaker_acquire,_Bool,uint32_t
|
||||
Function,-,furi_hal_speaker_deinit,void,
|
||||
@@ -2151,8 +2150,6 @@ Variable,+,gpio_ext_pd0,const GpioPin,
|
||||
Variable,+,gpio_ext_pe4,const GpioPin,
|
||||
Variable,+,gpio_i2c_power_scl,const GpioPin,
|
||||
Variable,+,gpio_i2c_power_sda,const GpioPin,
|
||||
Variable,+,gpio_ibutton,const GpioPin,
|
||||
Variable,+,gpio_periph_power,const GpioPin,
|
||||
Variable,+,gpio_pins,const GpioPinRecord[],
|
||||
Variable,+,gpio_pins_count,const size_t,
|
||||
Variable,+,gpio_sdcard_cd,const GpioPin,
|
||||
@@ -2161,13 +2158,11 @@ Variable,+,gpio_speaker,const GpioPin,
|
||||
Variable,+,gpio_spi_d_miso,const GpioPin,
|
||||
Variable,+,gpio_spi_d_mosi,const GpioPin,
|
||||
Variable,+,gpio_spi_d_sck,const GpioPin,
|
||||
Variable,+,gpio_swclk,const GpioPin,
|
||||
Variable,+,gpio_swdio,const GpioPin,
|
||||
Variable,+,gpio_usart_rx,const GpioPin,
|
||||
Variable,+,gpio_usart_tx,const GpioPin,
|
||||
Variable,+,gpio_usb_dm,const GpioPin,
|
||||
Variable,+,gpio_usb_dp,const GpioPin,
|
||||
Variable,+,gpio_vibro,const GpioPin,
|
||||
Variable,+,gpio_ibutton,const GpioPin,
|
||||
Variable,+,input_pins,const InputPin[],
|
||||
Variable,+,input_pins_count,const size_t,
|
||||
Variable,+,message_blink_set_color_blue,const NotificationMessage,
|
||||
@@ -2315,6 +2310,7 @@ Variable,+,message_red_255,const NotificationMessage,
|
||||
Variable,+,message_sound_off,const NotificationMessage,
|
||||
Variable,+,message_vibro_off,const NotificationMessage,
|
||||
Variable,+,message_vibro_on,const NotificationMessage,
|
||||
Variable,+,gpio_periph_power,const GpioPin,
|
||||
Variable,+,sequence_audiovisual_alert,const NotificationSequence,
|
||||
Variable,+,sequence_blink_blue_10,const NotificationSequence,
|
||||
Variable,+,sequence_blink_blue_100,const NotificationSequence,
|
||||
@@ -2369,3 +2365,4 @@ Variable,+,usb_cdc_single,FuriHalUsbInterface,
|
||||
Variable,+,usb_hid,FuriHalUsbInterface,
|
||||
Variable,+,usb_hid_u2f,FuriHalUsbInterface,
|
||||
Variable,+,usbd_devfs,const usbd_driver,
|
||||
Variable,+,gpio_vibro,const GpioPin,
|
||||
|
||||
|
@@ -213,17 +213,17 @@ Header,+,lib/toolbox/value_index.h,,
|
||||
Header,+,lib/toolbox/version.h,,
|
||||
Header,+,lib/u8g2/u8g2.h,,
|
||||
Function,-,LL_ADC_CommonDeInit,ErrorStatus,ADC_Common_TypeDef*
|
||||
Function,-,LL_ADC_CommonInit,ErrorStatus,"ADC_Common_TypeDef*, const LL_ADC_CommonInitTypeDef*"
|
||||
Function,-,LL_ADC_CommonInit,ErrorStatus,"ADC_Common_TypeDef*, LL_ADC_CommonInitTypeDef*"
|
||||
Function,-,LL_ADC_CommonStructInit,void,LL_ADC_CommonInitTypeDef*
|
||||
Function,-,LL_ADC_DeInit,ErrorStatus,ADC_TypeDef*
|
||||
Function,-,LL_ADC_INJ_Init,ErrorStatus,"ADC_TypeDef*, const LL_ADC_INJ_InitTypeDef*"
|
||||
Function,-,LL_ADC_INJ_Init,ErrorStatus,"ADC_TypeDef*, LL_ADC_INJ_InitTypeDef*"
|
||||
Function,-,LL_ADC_INJ_StructInit,void,LL_ADC_INJ_InitTypeDef*
|
||||
Function,-,LL_ADC_Init,ErrorStatus,"ADC_TypeDef*, const LL_ADC_InitTypeDef*"
|
||||
Function,-,LL_ADC_REG_Init,ErrorStatus,"ADC_TypeDef*, const LL_ADC_REG_InitTypeDef*"
|
||||
Function,-,LL_ADC_Init,ErrorStatus,"ADC_TypeDef*, LL_ADC_InitTypeDef*"
|
||||
Function,-,LL_ADC_REG_Init,ErrorStatus,"ADC_TypeDef*, LL_ADC_REG_InitTypeDef*"
|
||||
Function,-,LL_ADC_REG_StructInit,void,LL_ADC_REG_InitTypeDef*
|
||||
Function,-,LL_ADC_StructInit,void,LL_ADC_InitTypeDef*
|
||||
Function,-,LL_COMP_DeInit,ErrorStatus,COMP_TypeDef*
|
||||
Function,+,LL_COMP_Init,ErrorStatus,"COMP_TypeDef*, const LL_COMP_InitTypeDef*"
|
||||
Function,+,LL_COMP_Init,ErrorStatus,"COMP_TypeDef*, LL_COMP_InitTypeDef*"
|
||||
Function,-,LL_COMP_StructInit,void,LL_COMP_InitTypeDef*
|
||||
Function,-,LL_CRC_DeInit,ErrorStatus,CRC_TypeDef*
|
||||
Function,-,LL_CRS_DeInit,ErrorStatus,
|
||||
@@ -236,16 +236,16 @@ Function,-,LL_EXTI_StructInit,void,LL_EXTI_InitTypeDef*
|
||||
Function,-,LL_GPIO_DeInit,ErrorStatus,GPIO_TypeDef*
|
||||
Function,+,LL_GPIO_Init,ErrorStatus,"GPIO_TypeDef*, LL_GPIO_InitTypeDef*"
|
||||
Function,-,LL_GPIO_StructInit,void,LL_GPIO_InitTypeDef*
|
||||
Function,-,LL_I2C_DeInit,ErrorStatus,const I2C_TypeDef*
|
||||
Function,+,LL_I2C_Init,ErrorStatus,"I2C_TypeDef*, const LL_I2C_InitTypeDef*"
|
||||
Function,-,LL_I2C_DeInit,ErrorStatus,I2C_TypeDef*
|
||||
Function,+,LL_I2C_Init,ErrorStatus,"I2C_TypeDef*, LL_I2C_InitTypeDef*"
|
||||
Function,-,LL_I2C_StructInit,void,LL_I2C_InitTypeDef*
|
||||
Function,-,LL_Init1msTick,void,uint32_t
|
||||
Function,+,LL_LPTIM_DeInit,ErrorStatus,LPTIM_TypeDef*
|
||||
Function,-,LL_LPTIM_Disable,void,LPTIM_TypeDef*
|
||||
Function,+,LL_LPTIM_Init,ErrorStatus,"LPTIM_TypeDef*, const LL_LPTIM_InitTypeDef*"
|
||||
Function,+,LL_LPTIM_Init,ErrorStatus,"LPTIM_TypeDef*, LL_LPTIM_InitTypeDef*"
|
||||
Function,-,LL_LPTIM_StructInit,void,LL_LPTIM_InitTypeDef*
|
||||
Function,-,LL_LPUART_DeInit,ErrorStatus,const USART_TypeDef*
|
||||
Function,+,LL_LPUART_Init,ErrorStatus,"USART_TypeDef*, const LL_LPUART_InitTypeDef*"
|
||||
Function,-,LL_LPUART_DeInit,ErrorStatus,USART_TypeDef*
|
||||
Function,+,LL_LPUART_Init,ErrorStatus,"USART_TypeDef*, LL_LPUART_InitTypeDef*"
|
||||
Function,-,LL_LPUART_StructInit,void,LL_LPUART_InitTypeDef*
|
||||
Function,-,LL_PKA_DeInit,ErrorStatus,PKA_TypeDef*
|
||||
Function,-,LL_PKA_Init,ErrorStatus,"PKA_TypeDef*, LL_PKA_InitTypeDef*"
|
||||
@@ -290,23 +290,23 @@ Function,+,LL_SPI_Init,ErrorStatus,"SPI_TypeDef*, LL_SPI_InitTypeDef*"
|
||||
Function,-,LL_SPI_StructInit,void,LL_SPI_InitTypeDef*
|
||||
Function,-,LL_SetFlashLatency,ErrorStatus,uint32_t
|
||||
Function,+,LL_SetSystemCoreClock,void,uint32_t
|
||||
Function,-,LL_TIM_BDTR_Init,ErrorStatus,"TIM_TypeDef*, const LL_TIM_BDTR_InitTypeDef*"
|
||||
Function,-,LL_TIM_BDTR_Init,ErrorStatus,"TIM_TypeDef*, LL_TIM_BDTR_InitTypeDef*"
|
||||
Function,-,LL_TIM_BDTR_StructInit,void,LL_TIM_BDTR_InitTypeDef*
|
||||
Function,+,LL_TIM_DeInit,ErrorStatus,TIM_TypeDef*
|
||||
Function,-,LL_TIM_ENCODER_Init,ErrorStatus,"TIM_TypeDef*, const LL_TIM_ENCODER_InitTypeDef*"
|
||||
Function,-,LL_TIM_ENCODER_Init,ErrorStatus,"TIM_TypeDef*, LL_TIM_ENCODER_InitTypeDef*"
|
||||
Function,-,LL_TIM_ENCODER_StructInit,void,LL_TIM_ENCODER_InitTypeDef*
|
||||
Function,-,LL_TIM_HALLSENSOR_Init,ErrorStatus,"TIM_TypeDef*, const LL_TIM_HALLSENSOR_InitTypeDef*"
|
||||
Function,-,LL_TIM_HALLSENSOR_Init,ErrorStatus,"TIM_TypeDef*, LL_TIM_HALLSENSOR_InitTypeDef*"
|
||||
Function,-,LL_TIM_HALLSENSOR_StructInit,void,LL_TIM_HALLSENSOR_InitTypeDef*
|
||||
Function,-,LL_TIM_IC_Init,ErrorStatus,"TIM_TypeDef*, uint32_t, const LL_TIM_IC_InitTypeDef*"
|
||||
Function,-,LL_TIM_IC_Init,ErrorStatus,"TIM_TypeDef*, uint32_t, LL_TIM_IC_InitTypeDef*"
|
||||
Function,-,LL_TIM_IC_StructInit,void,LL_TIM_IC_InitTypeDef*
|
||||
Function,+,LL_TIM_Init,ErrorStatus,"TIM_TypeDef*, const LL_TIM_InitTypeDef*"
|
||||
Function,+,LL_TIM_OC_Init,ErrorStatus,"TIM_TypeDef*, uint32_t, const LL_TIM_OC_InitTypeDef*"
|
||||
Function,+,LL_TIM_Init,ErrorStatus,"TIM_TypeDef*, LL_TIM_InitTypeDef*"
|
||||
Function,+,LL_TIM_OC_Init,ErrorStatus,"TIM_TypeDef*, uint32_t, LL_TIM_OC_InitTypeDef*"
|
||||
Function,-,LL_TIM_OC_StructInit,void,LL_TIM_OC_InitTypeDef*
|
||||
Function,-,LL_TIM_StructInit,void,LL_TIM_InitTypeDef*
|
||||
Function,-,LL_USART_ClockInit,ErrorStatus,"USART_TypeDef*, const LL_USART_ClockInitTypeDef*"
|
||||
Function,-,LL_USART_ClockInit,ErrorStatus,"USART_TypeDef*, LL_USART_ClockInitTypeDef*"
|
||||
Function,-,LL_USART_ClockStructInit,void,LL_USART_ClockInitTypeDef*
|
||||
Function,-,LL_USART_DeInit,ErrorStatus,const USART_TypeDef*
|
||||
Function,+,LL_USART_Init,ErrorStatus,"USART_TypeDef*, const LL_USART_InitTypeDef*"
|
||||
Function,-,LL_USART_DeInit,ErrorStatus,USART_TypeDef*
|
||||
Function,+,LL_USART_Init,ErrorStatus,"USART_TypeDef*, LL_USART_InitTypeDef*"
|
||||
Function,-,LL_USART_StructInit,void,LL_USART_InitTypeDef*
|
||||
Function,-,LL_mDelay,void,uint32_t
|
||||
Function,-,SystemCoreClockUpdate,void,
|
||||
@@ -1106,7 +1106,6 @@ Function,+,furi_hal_crypto_verify_enclave,_Bool,"uint8_t*, uint8_t*"
|
||||
Function,+,furi_hal_crypto_verify_key,_Bool,uint8_t
|
||||
Function,+,furi_hal_debug_disable,void,
|
||||
Function,+,furi_hal_debug_enable,void,
|
||||
Function,+,furi_hal_debug_is_gdb_session_active,_Bool,
|
||||
Function,-,furi_hal_deinit_early,void,
|
||||
Function,-,furi_hal_flash_erase,void,uint8_t
|
||||
Function,-,furi_hal_flash_get_base,size_t,
|
||||
@@ -1239,6 +1238,7 @@ Function,-,furi_hal_os_init,void,
|
||||
Function,+,furi_hal_os_tick,void,
|
||||
Function,+,furi_hal_power_check_otg_status,void,
|
||||
Function,+,furi_hal_power_debug_get,void,"PropertyValueCallback, void*"
|
||||
Function,+,furi_hal_power_deep_sleep_available,_Bool,
|
||||
Function,+,furi_hal_power_disable_external_3_3v,void,
|
||||
Function,+,furi_hal_power_disable_otg,void,
|
||||
Function,+,furi_hal_power_enable_external_3_3v,void,
|
||||
@@ -1338,7 +1338,6 @@ Function,+,furi_hal_rtc_set_locale_units,void,FuriHalRtcLocaleUnits
|
||||
Function,+,furi_hal_rtc_set_log_level,void,uint8_t
|
||||
Function,+,furi_hal_rtc_set_pin_fails,void,uint32_t
|
||||
Function,+,furi_hal_rtc_set_register,void,"FuriHalRtcRegister, uint32_t"
|
||||
Function,+,furi_hal_rtc_sync_shadow,void,
|
||||
Function,+,furi_hal_rtc_validate_datetime,_Bool,FuriHalRtcDateTime*
|
||||
Function,+,furi_hal_speaker_acquire,_Bool,uint32_t
|
||||
Function,-,furi_hal_speaker_deinit,void,
|
||||
@@ -4741,12 +4740,10 @@ Variable,+,gpio_ext_pc1,const GpioPin,
|
||||
Variable,+,gpio_ext_pc3,const GpioPin,
|
||||
Variable,+,gpio_i2c_power_scl,const GpioPin,
|
||||
Variable,+,gpio_i2c_power_sda,const GpioPin,
|
||||
Variable,+,gpio_ibutton,const GpioPin,
|
||||
Variable,+,gpio_infrared_rx,const GpioPin,
|
||||
Variable,+,gpio_infrared_tx,const GpioPin,
|
||||
Variable,+,gpio_nfc_cs,const GpioPin,
|
||||
Variable,+,gpio_nfc_irq_rfid_pull,const GpioPin,
|
||||
Variable,+,gpio_periph_power,const GpioPin,
|
||||
Variable,+,gpio_pins,const GpioPinRecord[],
|
||||
Variable,+,gpio_pins_count,const size_t,
|
||||
Variable,+,gpio_rf_sw_0,const GpioPin,
|
||||
@@ -4773,7 +4770,7 @@ Variable,+,gpio_usart_rx,const GpioPin,
|
||||
Variable,+,gpio_usart_tx,const GpioPin,
|
||||
Variable,+,gpio_usb_dm,const GpioPin,
|
||||
Variable,+,gpio_usb_dp,const GpioPin,
|
||||
Variable,+,gpio_vibro,const GpioPin,
|
||||
Variable,+,gpio_ibutton,const GpioPin,
|
||||
Variable,+,input_pins,const InputPin[],
|
||||
Variable,+,input_pins_count,const size_t,
|
||||
Variable,+,lfrfid_protocols,const ProtocolBase*[],
|
||||
@@ -4922,6 +4919,7 @@ Variable,+,message_red_255,const NotificationMessage,
|
||||
Variable,+,message_sound_off,const NotificationMessage,
|
||||
Variable,+,message_vibro_off,const NotificationMessage,
|
||||
Variable,+,message_vibro_on,const NotificationMessage,
|
||||
Variable,+,gpio_periph_power,const GpioPin,
|
||||
Variable,+,sequence_audiovisual_alert,const NotificationSequence,
|
||||
Variable,+,sequence_blink_blue_10,const NotificationSequence,
|
||||
Variable,+,sequence_blink_blue_100,const NotificationSequence,
|
||||
@@ -6928,3 +6926,4 @@ Variable,+,usb_cdc_single,FuriHalUsbInterface,
|
||||
Variable,+,usb_hid,FuriHalUsbInterface,
|
||||
Variable,+,usb_hid_u2f,FuriHalUsbInterface,
|
||||
Variable,+,usbd_devfs,const usbd_driver,
|
||||
Variable,+,gpio_vibro,const GpioPin,
|
||||
|
||||
|
@@ -33,7 +33,6 @@ extern "C" {
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <core/common_defines.h>
|
||||
#include <tl.h>
|
||||
|
||||
#include "app_conf.h"
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
|
||||
#define CFG_TX_POWER (0x19) /* +0dBm */
|
||||
|
||||
#define CFG_IDENTITY_ADDRESS GAP_PUBLIC_ADDR
|
||||
|
||||
/**
|
||||
* Define Advertising parameters
|
||||
*/
|
||||
|
||||
@@ -33,8 +33,7 @@ PLACE_IN_SECTION("MB_MEM2")
|
||||
ALIGN(4) static SHCI_C2_DEBUG_TracesConfig_t APPD_TracesConfig = {0, 0, 0, 0};
|
||||
PLACE_IN_SECTION("MB_MEM2")
|
||||
ALIGN(4)
|
||||
static SHCI_C2_DEBUG_GeneralConfig_t APPD_GeneralConfig =
|
||||
{BLE_DTB_CFG, SYS_DBG_CFG1, {0, 0}, 0, 0, 0, 0, 0};
|
||||
static SHCI_C2_DEBUG_GeneralConfig_t APPD_GeneralConfig = {BLE_DTB_CFG, SYS_DBG_CFG1, {0, 0}};
|
||||
|
||||
/**
|
||||
* THE DEBUG ON GPIO FOR CPU2 IS INTENDED TO BE USED ONLY ON REQUEST FROM ST SUPPORT
|
||||
|
||||
@@ -18,8 +18,8 @@ PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static TL_CmdPacket_t ble_app_cmd_buffer;
|
||||
PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static uint32_t ble_app_nvm[BLE_NVM_SRAM_SIZE];
|
||||
|
||||
_Static_assert(
|
||||
sizeof(SHCI_C2_Ble_Init_Cmd_Packet_t) == 58,
|
||||
"Ble stack config structure size mismatch (check new config options - last updated for v.1.16.0)");
|
||||
sizeof(SHCI_C2_Ble_Init_Cmd_Packet_t) == 49,
|
||||
"Ble stack config structure size mismatch");
|
||||
|
||||
typedef struct {
|
||||
FuriMutex* hci_mtx;
|
||||
@@ -88,12 +88,6 @@ bool ble_app_init() {
|
||||
.min_tx_power = 0,
|
||||
.max_tx_power = 0,
|
||||
.rx_model_config = 1,
|
||||
/* New stack (13.3->16.0)*/
|
||||
.max_adv_set_nbr = 1, // Only used if SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV is set
|
||||
.max_adv_data_len = 31, // Only used if SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV is set
|
||||
.tx_path_compens = 0, // RF TX Path Compensation, * 0.1 dB
|
||||
.rx_path_compens = 0, // RF RX Path Compensation, * 0.1 dB
|
||||
.ble_core_version = 11, // BLE Core Version: 11(5.2), 12(5.3)
|
||||
}};
|
||||
status = SHCI_C2_BLE_Init(&ble_init_cmd_packet);
|
||||
if(status) {
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <ble/core/ble_std.h>
|
||||
#include <ble/core/ble_defs.h>
|
||||
#include "osal.h"
|
||||
#include "compiler.h"
|
||||
|
||||
/* Default BLE variant */
|
||||
#ifndef BASIC_FEATURES
|
||||
@@ -35,9 +34,6 @@
|
||||
#ifndef LL_ONLY
|
||||
#define LL_ONLY 0
|
||||
#endif
|
||||
#ifndef LL_ONLY_BASIC
|
||||
#define LL_ONLY_BASIC 0
|
||||
#endif
|
||||
#ifndef BEACON_ONLY
|
||||
#define BEACON_ONLY 0
|
||||
#endif
|
||||
|
||||
@@ -58,6 +58,12 @@ void ble_glue_init() {
|
||||
ble_glue = malloc(sizeof(BleGlue));
|
||||
ble_glue->status = BleGlueStatusStartup;
|
||||
|
||||
// Configure the system Power Mode
|
||||
// Select HSI as system clock source after Wake Up from Stop mode
|
||||
LL_RCC_SetClkAfterWakeFromStop(LL_RCC_STOP_WAKEUPCLOCK_HSI);
|
||||
/* Initialize the CPU2 reset value before starting CPU2 with C2BOOT */
|
||||
LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
|
||||
|
||||
#ifdef BLE_GLUE_DEBUG
|
||||
APPD_Init();
|
||||
#endif
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*****************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2018-2023 STMicroelectronics.
|
||||
* Copyright (c) 2018-2022 STMicroelectronics.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is licensed under terms that can be found in the LICENSE file
|
||||
@@ -18,14 +18,6 @@
|
||||
#ifndef COMPILER_H__
|
||||
#define COMPILER_H__
|
||||
|
||||
#ifndef __PACKED_STRUCT
|
||||
#define __PACKED_STRUCT PACKED(struct)
|
||||
#endif
|
||||
|
||||
#ifndef __PACKED_UNION
|
||||
#define __PACKED_UNION PACKED(union)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief This is the section dedicated to IAR toolchain
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "gap.h"
|
||||
|
||||
#include "app_common.h"
|
||||
#include <ble/ble.h>
|
||||
|
||||
#include <furi_hal.h>
|
||||
@@ -86,7 +85,7 @@ static void gap_verify_connection_parameters(Gap* gap) {
|
||||
SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification(void* pckt) {
|
||||
hci_event_pckt* event_pckt;
|
||||
evt_le_meta_event* meta_evt;
|
||||
evt_blecore_aci* blue_evt;
|
||||
evt_blue_aci* blue_evt;
|
||||
hci_le_phy_update_complete_event_rp0* evt_le_phy_update_complete;
|
||||
uint8_t tx_phy;
|
||||
uint8_t rx_phy;
|
||||
@@ -98,7 +97,7 @@ SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification(void* pckt) {
|
||||
furi_mutex_acquire(gap->state_mutex, FuriWaitForever);
|
||||
}
|
||||
switch(event_pckt->evt) {
|
||||
case HCI_DISCONNECTION_COMPLETE_EVT_CODE: {
|
||||
case EVT_DISCONN_COMPLETE: {
|
||||
hci_disconnection_complete_event_rp0* disconnection_complete_event =
|
||||
(hci_disconnection_complete_event_rp0*)event_pckt->data;
|
||||
if(disconnection_complete_event->Connection_Handle == gap->service.connection_handle) {
|
||||
@@ -117,10 +116,10 @@ SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification(void* pckt) {
|
||||
gap->on_event_cb(event, gap->context);
|
||||
} break;
|
||||
|
||||
case HCI_LE_META_EVT_CODE:
|
||||
case EVT_LE_META_EVENT:
|
||||
meta_evt = (evt_le_meta_event*)event_pckt->data;
|
||||
switch(meta_evt->subevent) {
|
||||
case HCI_LE_CONNECTION_UPDATE_COMPLETE_SUBEVT_CODE: {
|
||||
case EVT_LE_CONN_UPDATE_COMPLETE: {
|
||||
hci_le_connection_update_complete_event_rp0* event =
|
||||
(hci_le_connection_update_complete_event_rp0*)meta_evt->data;
|
||||
gap->connection_params.conn_interval = event->Conn_Interval;
|
||||
@@ -131,7 +130,7 @@ SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification(void* pckt) {
|
||||
break;
|
||||
}
|
||||
|
||||
case HCI_LE_PHY_UPDATE_COMPLETE_SUBEVT_CODE:
|
||||
case EVT_LE_PHY_UPDATE_COMPLETE:
|
||||
evt_le_phy_update_complete = (hci_le_phy_update_complete_event_rp0*)meta_evt->data;
|
||||
if(evt_le_phy_update_complete->Status) {
|
||||
FURI_LOG_E(
|
||||
@@ -147,7 +146,7 @@ SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification(void* pckt) {
|
||||
}
|
||||
break;
|
||||
|
||||
case HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE: {
|
||||
case EVT_LE_CONN_COMPLETE: {
|
||||
hci_le_connection_complete_event_rp0* event =
|
||||
(hci_le_connection_complete_event_rp0*)meta_evt->data;
|
||||
gap->connection_params.conn_interval = event->Conn_Interval;
|
||||
@@ -171,16 +170,16 @@ SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification(void* pckt) {
|
||||
}
|
||||
break;
|
||||
|
||||
case HCI_VENDOR_SPECIFIC_DEBUG_EVT_CODE:
|
||||
blue_evt = (evt_blecore_aci*)event_pckt->data;
|
||||
case EVT_VENDOR:
|
||||
blue_evt = (evt_blue_aci*)event_pckt->data;
|
||||
switch(blue_evt->ecode) {
|
||||
aci_gap_pairing_complete_event_rp0* pairing_complete;
|
||||
|
||||
case ACI_GAP_LIMITED_DISCOVERABLE_VSEVT_CODE:
|
||||
case EVT_BLUE_GAP_LIMITED_DISCOVERABLE:
|
||||
FURI_LOG_I(TAG, "Limited discoverable event");
|
||||
break;
|
||||
|
||||
case ACI_GAP_PASS_KEY_REQ_VSEVT_CODE: {
|
||||
case EVT_BLUE_GAP_PASS_KEY_REQUEST: {
|
||||
// Generate random PIN code
|
||||
uint32_t pin = rand() % 999999; //-V1064
|
||||
aci_gap_pass_key_resp(gap->service.connection_handle, pin);
|
||||
@@ -193,7 +192,7 @@ SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification(void* pckt) {
|
||||
gap->on_event_cb(event, gap->context);
|
||||
} break;
|
||||
|
||||
case ACI_ATT_EXCHANGE_MTU_RESP_VSEVT_CODE: {
|
||||
case EVT_BLUE_ATT_EXCHANGE_MTU_RESP: {
|
||||
aci_att_exchange_mtu_resp_event_rp0* pr = (void*)blue_evt->data;
|
||||
FURI_LOG_I(TAG, "Rx MTU size: %d", pr->Server_RX_MTU);
|
||||
// Set maximum packet size given header size is 3 bytes
|
||||
@@ -202,28 +201,32 @@ SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification(void* pckt) {
|
||||
gap->on_event_cb(event, gap->context);
|
||||
} break;
|
||||
|
||||
case ACI_GAP_AUTHORIZATION_REQ_VSEVT_CODE:
|
||||
case EVT_BLUE_GAP_AUTHORIZATION_REQUEST:
|
||||
FURI_LOG_D(TAG, "Authorization request event");
|
||||
break;
|
||||
|
||||
case ACI_GAP_SLAVE_SECURITY_INITIATED_VSEVT_CODE:
|
||||
case EVT_BLUE_GAP_SLAVE_SECURITY_INITIATED:
|
||||
FURI_LOG_D(TAG, "Slave security initiated");
|
||||
break;
|
||||
|
||||
case ACI_GAP_BOND_LOST_VSEVT_CODE:
|
||||
case EVT_BLUE_GAP_BOND_LOST:
|
||||
FURI_LOG_D(TAG, "Bond lost event. Start rebonding");
|
||||
aci_gap_allow_rebond(gap->service.connection_handle);
|
||||
break;
|
||||
|
||||
case ACI_GAP_ADDR_NOT_RESOLVED_VSEVT_CODE:
|
||||
case EVT_BLUE_GAP_DEVICE_FOUND:
|
||||
FURI_LOG_D(TAG, "Device found event");
|
||||
break;
|
||||
|
||||
case EVT_BLUE_GAP_ADDR_NOT_RESOLVED:
|
||||
FURI_LOG_D(TAG, "Address not resolved event");
|
||||
break;
|
||||
|
||||
case ACI_GAP_KEYPRESS_NOTIFICATION_VSEVT_CODE:
|
||||
case EVT_BLUE_GAP_KEYPRESS_NOTIFICATION:
|
||||
FURI_LOG_D(TAG, "Key press notification event");
|
||||
break;
|
||||
|
||||
case ACI_GAP_NUMERIC_COMPARISON_VALUE_VSEVT_CODE: {
|
||||
case EVT_BLUE_GAP_NUMERIC_COMPARISON_VALUE: {
|
||||
uint32_t pin =
|
||||
((aci_gap_numeric_comparison_value_event_rp0*)(blue_evt->data))->Numeric_Value;
|
||||
FURI_LOG_I(TAG, "Verify numeric comparison: %06lu", pin);
|
||||
@@ -233,7 +236,7 @@ SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification(void* pckt) {
|
||||
break;
|
||||
}
|
||||
|
||||
case ACI_GAP_PAIRING_COMPLETE_VSEVT_CODE:
|
||||
case EVT_BLUE_GAP_PAIRING_CMPLT:
|
||||
pairing_complete = (aci_gap_pairing_complete_event_rp0*)blue_evt->data;
|
||||
if(pairing_complete->Status) {
|
||||
FURI_LOG_E(
|
||||
@@ -248,11 +251,11 @@ SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification(void* pckt) {
|
||||
}
|
||||
break;
|
||||
|
||||
case ACI_L2CAP_CONNECTION_UPDATE_RESP_VSEVT_CODE:
|
||||
case EVT_BLUE_GAP_PROCEDURE_COMPLETE:
|
||||
FURI_LOG_D(TAG, "Procedure complete event");
|
||||
break;
|
||||
|
||||
case ACI_L2CAP_CONNECTION_UPDATE_REQ_VSEVT_CODE: {
|
||||
case EVT_BLUE_L2CAP_CONNECTION_UPDATE_RESP: {
|
||||
uint16_t result =
|
||||
((aci_l2cap_connection_update_resp_event_rp0*)(blue_evt->data))->Result;
|
||||
if(result == 0) {
|
||||
@@ -361,7 +364,7 @@ static void gap_init_svc(Gap* gap) {
|
||||
CFG_ENCRYPTION_KEY_SIZE_MAX,
|
||||
CFG_USED_FIXED_PIN,
|
||||
0,
|
||||
CFG_IDENTITY_ADDRESS);
|
||||
PUBLIC_ADDR);
|
||||
// Configure whitelist
|
||||
aci_gap_configure_whitelist();
|
||||
}
|
||||
@@ -396,7 +399,7 @@ static void gap_advertise_start(GapState new_state) {
|
||||
ADV_IND,
|
||||
min_interval,
|
||||
max_interval,
|
||||
CFG_IDENTITY_ADDRESS,
|
||||
PUBLIC_ADDR,
|
||||
0,
|
||||
strlen(gap->service.adv_name),
|
||||
(uint8_t*)gap->service.adv_name,
|
||||
|
||||
@@ -63,10 +63,6 @@ void furi_hal_clock_init() {
|
||||
LL_RCC_HSI_Enable();
|
||||
while(!HS_CLOCK_IS_READY())
|
||||
;
|
||||
/* Select HSI as system clock source after Wake Up from Stop mode
|
||||
* Must be set before enabling CSS */
|
||||
LL_RCC_SetClkAfterWakeFromStop(LL_RCC_STOP_WAKEUPCLOCK_HSI);
|
||||
|
||||
LL_RCC_HSE_EnableCSS();
|
||||
|
||||
/* LSE and LSI1 configuration and activation */
|
||||
@@ -219,14 +215,11 @@ void furi_hal_clock_switch_to_hsi() {
|
||||
void furi_hal_clock_switch_to_pll() {
|
||||
LL_RCC_HSE_Enable();
|
||||
LL_RCC_PLL_Enable();
|
||||
LL_RCC_PLLSAI1_Enable();
|
||||
|
||||
while(!LL_RCC_HSE_IsReady())
|
||||
;
|
||||
while(!LL_RCC_PLL_IsReady())
|
||||
;
|
||||
while(!LL_RCC_PLLSAI1_IsReady())
|
||||
;
|
||||
|
||||
LL_FLASH_SetLatency(LL_FLASH_LATENCY_3);
|
||||
|
||||
|
||||
@@ -3,26 +3,12 @@
|
||||
#include <stm32wbxx_ll_exti.h>
|
||||
#include <stm32wbxx_ll_system.h>
|
||||
|
||||
#include <furi_hal_gpio.h>
|
||||
#include <furi_hal_resources.h>
|
||||
|
||||
volatile bool furi_hal_debug_gdb_session_active = false;
|
||||
|
||||
void furi_hal_debug_enable() {
|
||||
// Low power mode debug
|
||||
LL_DBGMCU_EnableDBGSleepMode();
|
||||
LL_DBGMCU_EnableDBGStopMode();
|
||||
LL_DBGMCU_EnableDBGStandbyMode();
|
||||
LL_EXTI_EnableIT_32_63(LL_EXTI_LINE_48);
|
||||
// SWD GPIO
|
||||
furi_hal_gpio_init_ex(
|
||||
&gpio_swdio,
|
||||
GpioModeAltFunctionPushPull,
|
||||
GpioPullUp,
|
||||
GpioSpeedVeryHigh,
|
||||
GpioAltFn0JTMS_SWDIO);
|
||||
furi_hal_gpio_init_ex(
|
||||
&gpio_swclk, GpioModeAltFunctionPushPull, GpioPullDown, GpioSpeedLow, GpioAltFn0JTCK_SWCLK);
|
||||
}
|
||||
|
||||
void furi_hal_debug_disable() {
|
||||
@@ -31,11 +17,4 @@ void furi_hal_debug_disable() {
|
||||
LL_DBGMCU_DisableDBGStopMode();
|
||||
LL_DBGMCU_DisableDBGStandbyMode();
|
||||
LL_EXTI_DisableIT_32_63(LL_EXTI_LINE_48);
|
||||
// SWD GPIO
|
||||
furi_hal_gpio_init_simple(&gpio_swdio, GpioModeAnalog);
|
||||
furi_hal_gpio_init_simple(&gpio_swclk, GpioModeAnalog);
|
||||
}
|
||||
|
||||
bool furi_hal_debug_is_gdb_session_active() {
|
||||
return furi_hal_debug_gdb_session_active;
|
||||
}
|
||||
@@ -28,24 +28,11 @@
|
||||
// Arbitrary (but small) number for better tick consistency
|
||||
#define FURI_HAL_OS_EXTRA_CNT 3
|
||||
|
||||
#ifndef FURI_HAL_OS_DEBUG_AWAKE_GPIO
|
||||
#define FURI_HAL_OS_DEBUG_AWAKE_GPIO (&gpio_ext_pa7)
|
||||
#endif
|
||||
|
||||
#ifndef FURI_HAL_OS_DEBUG_TICK_GPIO
|
||||
#define FURI_HAL_OS_DEBUG_TICK_GPIO (&gpio_ext_pa6)
|
||||
#endif
|
||||
|
||||
#ifndef FURI_HAL_OS_DEBUG_SECOND_GPIO
|
||||
#define FURI_HAL_OS_DEBUG_SECOND_GPIO (&gpio_ext_pa4)
|
||||
#endif
|
||||
|
||||
#ifdef FURI_HAL_OS_DEBUG
|
||||
#include <stm32wbxx_ll_gpio.h>
|
||||
|
||||
void furi_hal_os_timer_callback() {
|
||||
furi_hal_gpio_write(
|
||||
FURI_HAL_OS_DEBUG_SECOND_GPIO, !furi_hal_gpio_read(FURI_HAL_OS_DEBUG_SECOND_GPIO));
|
||||
furi_hal_gpio_write(&gpio_ext_pa4, !furi_hal_gpio_read(&gpio_ext_pa4));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -57,11 +44,9 @@ void furi_hal_os_init() {
|
||||
furi_hal_idle_timer_init();
|
||||
|
||||
#ifdef FURI_HAL_OS_DEBUG
|
||||
furi_hal_gpio_init_simple(FURI_HAL_OS_DEBUG_AWAKE_GPIO, GpioModeOutputPushPull);
|
||||
furi_hal_gpio_init_simple(FURI_HAL_OS_DEBUG_TICK_GPIO, GpioModeOutputPushPull);
|
||||
furi_hal_gpio_init_simple(FURI_HAL_OS_DEBUG_SECOND_GPIO, GpioModeOutputPushPull);
|
||||
furi_hal_gpio_write(FURI_HAL_OS_DEBUG_AWAKE_GPIO, 1);
|
||||
|
||||
furi_hal_gpio_init_simple(&gpio_ext_pa7, GpioModeOutputPushPull);
|
||||
furi_hal_gpio_init_simple(&gpio_ext_pa6, GpioModeOutputPushPull);
|
||||
furi_hal_gpio_init_simple(&gpio_ext_pa4, GpioModeOutputPushPull);
|
||||
FuriTimer* second_timer =
|
||||
furi_timer_alloc(furi_hal_os_timer_callback, FuriTimerTypePeriodic, NULL);
|
||||
furi_timer_start(second_timer, FURI_HAL_OS_TICK_HZ);
|
||||
@@ -73,8 +58,7 @@ void furi_hal_os_init() {
|
||||
void furi_hal_os_tick() {
|
||||
if(xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) {
|
||||
#ifdef FURI_HAL_OS_DEBUG
|
||||
furi_hal_gpio_write(
|
||||
FURI_HAL_OS_DEBUG_TICK_GPIO, !furi_hal_gpio_read(FURI_HAL_OS_DEBUG_TICK_GPIO));
|
||||
furi_hal_gpio_write(&gpio_ext_pa6, !furi_hal_gpio_read(&gpio_ext_pa6));
|
||||
#endif
|
||||
xPortSysTickHandler();
|
||||
}
|
||||
@@ -137,14 +121,14 @@ static inline uint32_t furi_hal_os_sleep(TickType_t expected_idle_ticks) {
|
||||
furi_hal_idle_timer_start(FURI_HAL_OS_TICKS_TO_IDLE_CNT(expected_idle_ticks));
|
||||
|
||||
#ifdef FURI_HAL_OS_DEBUG
|
||||
furi_hal_gpio_write(FURI_HAL_OS_DEBUG_AWAKE_GPIO, 0);
|
||||
furi_hal_gpio_write(&gpio_ext_pa7, 0);
|
||||
#endif
|
||||
|
||||
// Go to sleep mode
|
||||
furi_hal_power_sleep();
|
||||
|
||||
#ifdef FURI_HAL_OS_DEBUG
|
||||
furi_hal_gpio_write(FURI_HAL_OS_DEBUG_AWAKE_GPIO, 1);
|
||||
furi_hal_gpio_write(&gpio_ext_pa7, 1);
|
||||
#endif
|
||||
|
||||
// Calculate how much time we spent in the sleep
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
#include <furi_hal_vibro.h>
|
||||
#include <furi_hal_resources.h>
|
||||
#include <furi_hal_uart.h>
|
||||
#include <furi_hal_rtc.h>
|
||||
#include <furi_hal_debug.h>
|
||||
|
||||
#include <stm32wbxx_ll_rcc.h>
|
||||
#include <stm32wbxx_ll_pwr.h>
|
||||
@@ -21,24 +19,15 @@
|
||||
|
||||
#define TAG "FuriHalPower"
|
||||
|
||||
#ifndef FURI_HAL_POWER_DEBUG_WFI_GPIO
|
||||
#define FURI_HAL_POWER_DEBUG_WFI_GPIO (&gpio_ext_pb2)
|
||||
#endif
|
||||
|
||||
#ifndef FURI_HAL_POWER_DEBUG_STOP_GPIO
|
||||
#define FURI_HAL_POWER_DEBUG_STOP_GPIO (&gpio_ext_pc3)
|
||||
#endif
|
||||
|
||||
#ifndef FURI_HAL_POWER_DEBUG_ABNORMAL_GPIO
|
||||
#define FURI_HAL_POWER_DEBUG_ABNORMAL_GPIO (&gpio_ext_pb3)
|
||||
#endif
|
||||
|
||||
#ifndef FURI_HAL_POWER_STOP_MODE
|
||||
#define FURI_HAL_POWER_STOP_MODE (LL_PWR_MODE_STOP2)
|
||||
#ifdef FURI_HAL_POWER_DEEP_SLEEP_ENABLED
|
||||
#define FURI_HAL_POWER_DEEP_INSOMNIA 0
|
||||
#else
|
||||
#define FURI_HAL_POWER_DEEP_INSOMNIA 1
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
volatile uint8_t insomnia;
|
||||
volatile uint8_t deep_insomnia;
|
||||
volatile uint8_t suppress_charge;
|
||||
|
||||
uint8_t gauge_initialized;
|
||||
@@ -47,6 +36,7 @@ typedef struct {
|
||||
|
||||
static volatile FuriHalPower furi_hal_power = {
|
||||
.insomnia = 0,
|
||||
.deep_insomnia = FURI_HAL_POWER_DEEP_INSOMNIA,
|
||||
.suppress_charge = 0,
|
||||
};
|
||||
|
||||
@@ -89,25 +79,19 @@ const ParamCEDV cedv = {
|
||||
};
|
||||
|
||||
void furi_hal_power_init() {
|
||||
#ifdef FURI_HAL_POWER_DEBUG
|
||||
furi_hal_gpio_init_simple(FURI_HAL_POWER_DEBUG_WFI_GPIO, GpioModeOutputPushPull);
|
||||
furi_hal_gpio_init_simple(FURI_HAL_POWER_DEBUG_STOP_GPIO, GpioModeOutputPushPull);
|
||||
furi_hal_gpio_init_simple(FURI_HAL_POWER_DEBUG_ABNORMAL_GPIO, GpioModeOutputPushPull);
|
||||
furi_hal_gpio_write(FURI_HAL_POWER_DEBUG_WFI_GPIO, 0);
|
||||
furi_hal_gpio_write(FURI_HAL_POWER_DEBUG_STOP_GPIO, 0);
|
||||
furi_hal_gpio_write(FURI_HAL_POWER_DEBUG_ABNORMAL_GPIO, 0);
|
||||
#endif
|
||||
|
||||
LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
|
||||
LL_PWR_SMPS_SetMode(LL_PWR_SMPS_STEP_DOWN);
|
||||
LL_PWR_SetPowerMode(FURI_HAL_POWER_STOP_MODE);
|
||||
LL_C2_PWR_SetPowerMode(FURI_HAL_POWER_STOP_MODE);
|
||||
|
||||
furi_hal_i2c_acquire(&furi_hal_i2c_handle_power);
|
||||
bq27220_init(&furi_hal_i2c_handle_power, &cedv);
|
||||
bq25896_init(&furi_hal_i2c_handle_power);
|
||||
furi_hal_i2c_release(&furi_hal_i2c_handle_power);
|
||||
|
||||
#ifdef FURI_HAL_OS_DEBUG
|
||||
furi_hal_gpio_init_simple(&gpio_ext_pb2, GpioModeOutputPushPull);
|
||||
furi_hal_gpio_init_simple(&gpio_ext_pc3, GpioModeOutputPushPull);
|
||||
#endif
|
||||
|
||||
FURI_LOG_I(TAG, "Init OK");
|
||||
}
|
||||
|
||||
@@ -156,14 +140,11 @@ bool furi_hal_power_sleep_available() {
|
||||
return furi_hal_power.insomnia == 0;
|
||||
}
|
||||
|
||||
static inline bool furi_hal_power_deep_sleep_available() {
|
||||
return furi_hal_bt_is_alive() && !furi_hal_rtc_is_flag_set(FuriHalRtcFlagLegacySleep) &&
|
||||
!furi_hal_debug_is_gdb_session_active() && !LL_PWR_IsActiveFlag_CRPE() &&
|
||||
!LL_PWR_IsActiveFlag_CRP() && !LL_PWR_IsActiveFlag_BLEA() &&
|
||||
!LL_PWR_IsActiveFlag_BLEWU();
|
||||
bool furi_hal_power_deep_sleep_available() {
|
||||
return furi_hal_bt_is_alive() && furi_hal_power.deep_insomnia == 0;
|
||||
}
|
||||
|
||||
static inline void furi_hal_power_light_sleep() {
|
||||
void furi_hal_power_light_sleep() {
|
||||
__WFI();
|
||||
}
|
||||
|
||||
@@ -171,15 +152,17 @@ static inline void furi_hal_power_suspend_aux_periphs() {
|
||||
// Disable USART
|
||||
furi_hal_uart_suspend(FuriHalUartIdUSART1);
|
||||
furi_hal_uart_suspend(FuriHalUartIdLPUART1);
|
||||
// TODO: Disable USB
|
||||
}
|
||||
|
||||
static inline void furi_hal_power_resume_aux_periphs() {
|
||||
// Re-enable USART
|
||||
furi_hal_uart_resume(FuriHalUartIdUSART1);
|
||||
furi_hal_uart_resume(FuriHalUartIdLPUART1);
|
||||
// TODO: Re-enable USB
|
||||
}
|
||||
|
||||
static inline void furi_hal_power_deep_sleep() {
|
||||
void furi_hal_power_deep_sleep() {
|
||||
furi_hal_power_suspend_aux_periphs();
|
||||
|
||||
while(LL_HSEM_1StepLock(HSEM, CFG_HW_RCC_SEMID))
|
||||
@@ -204,6 +187,8 @@ static inline void furi_hal_power_deep_sleep() {
|
||||
LL_HSEM_ReleaseLock(HSEM, CFG_HW_RCC_SEMID, 0);
|
||||
|
||||
// Prepare deep sleep
|
||||
LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
|
||||
LL_C2_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
|
||||
LL_LPM_EnableDeepSleep();
|
||||
|
||||
#if defined(__CC_ARM)
|
||||
@@ -211,19 +196,17 @@ static inline void furi_hal_power_deep_sleep() {
|
||||
__force_stores();
|
||||
#endif
|
||||
|
||||
bool should_abort_sleep = LL_PWR_IsActiveFlag_CRPE() || LL_PWR_IsActiveFlag_CRP() ||
|
||||
LL_PWR_IsActiveFlag_BLEA() || LL_PWR_IsActiveFlag_BLEWU();
|
||||
|
||||
if(should_abort_sleep) {
|
||||
#ifdef FURI_HAL_POWER_DEBUG
|
||||
furi_hal_gpio_write(FURI_HAL_POWER_DEBUG_ABNORMAL_GPIO, 1);
|
||||
#endif
|
||||
} else {
|
||||
__WFI();
|
||||
}
|
||||
|
||||
LL_LPM_EnableSleep();
|
||||
|
||||
// Make sure that values differ to prevent disaster on wfi
|
||||
LL_PWR_SetPowerMode(LL_PWR_MODE_STOP0);
|
||||
LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
|
||||
|
||||
LL_PWR_ClearFlag_C1STOP_C1STB();
|
||||
LL_PWR_ClearFlag_C2STOP_C2STB();
|
||||
|
||||
/* Release ENTRY_STOP_MODE semaphore */
|
||||
LL_HSEM_ReleaseLock(HSEM, CFG_HW_ENTRY_STOP_MODE_SEMID, 0);
|
||||
|
||||
@@ -237,25 +220,28 @@ static inline void furi_hal_power_deep_sleep() {
|
||||
LL_HSEM_ReleaseLock(HSEM, CFG_HW_RCC_SEMID, 0);
|
||||
|
||||
furi_hal_power_resume_aux_periphs();
|
||||
furi_hal_rtc_sync_shadow();
|
||||
}
|
||||
|
||||
void furi_hal_power_sleep() {
|
||||
if(furi_hal_power_deep_sleep_available()) {
|
||||
#ifdef FURI_HAL_POWER_DEBUG
|
||||
furi_hal_gpio_write(FURI_HAL_POWER_DEBUG_STOP_GPIO, 1);
|
||||
#ifdef FURI_HAL_OS_DEBUG
|
||||
furi_hal_gpio_write(&gpio_ext_pc3, 1);
|
||||
#endif
|
||||
|
||||
furi_hal_power_deep_sleep();
|
||||
#ifdef FURI_HAL_POWER_DEBUG
|
||||
furi_hal_gpio_write(FURI_HAL_POWER_DEBUG_STOP_GPIO, 0);
|
||||
|
||||
#ifdef FURI_HAL_OS_DEBUG
|
||||
furi_hal_gpio_write(&gpio_ext_pc3, 0);
|
||||
#endif
|
||||
} else {
|
||||
#ifdef FURI_HAL_POWER_DEBUG
|
||||
furi_hal_gpio_write(FURI_HAL_POWER_DEBUG_WFI_GPIO, 1);
|
||||
#ifdef FURI_HAL_OS_DEBUG
|
||||
furi_hal_gpio_write(&gpio_ext_pb2, 1);
|
||||
#endif
|
||||
|
||||
furi_hal_power_light_sleep();
|
||||
#ifdef FURI_HAL_POWER_DEBUG
|
||||
furi_hal_gpio_write(FURI_HAL_POWER_DEBUG_WFI_GPIO, 0);
|
||||
|
||||
#ifdef FURI_HAL_OS_DEBUG
|
||||
furi_hal_gpio_write(&gpio_ext_pb2, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,35 +9,19 @@
|
||||
|
||||
#define TAG "FuriHalRandom"
|
||||
|
||||
static uint32_t furi_hal_random_read_rng() {
|
||||
while(LL_RNG_IsActiveFlag_CECS(RNG) && LL_RNG_IsActiveFlag_SECS(RNG) &&
|
||||
!LL_RNG_IsActiveFlag_DRDY(RNG)) {
|
||||
/* Error handling as described in RM0434, pg. 582-583 */
|
||||
if(LL_RNG_IsActiveFlag_CECS(RNG)) {
|
||||
/* Clock error occurred */
|
||||
LL_RNG_ClearFlag_CEIS(RNG);
|
||||
}
|
||||
|
||||
if(LL_RNG_IsActiveFlag_SECS(RNG)) {
|
||||
/* Noise source error occurred */
|
||||
LL_RNG_ClearFlag_SEIS(RNG);
|
||||
|
||||
for(uint32_t i = 0; i < 12; ++i) {
|
||||
const volatile uint32_t discard = LL_RNG_ReadRandData32(RNG);
|
||||
UNUSED(discard);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return LL_RNG_ReadRandData32(RNG);
|
||||
}
|
||||
|
||||
uint32_t furi_hal_random_get() {
|
||||
while(LL_HSEM_1StepLock(HSEM, CFG_HW_RNG_SEMID))
|
||||
;
|
||||
LL_RNG_Enable(RNG);
|
||||
|
||||
const uint32_t random_val = furi_hal_random_read_rng();
|
||||
while(!LL_RNG_IsActiveFlag_DRDY(RNG))
|
||||
;
|
||||
|
||||
if((LL_RNG_IsActiveFlag_CECS(RNG)) || (LL_RNG_IsActiveFlag_SECS(RNG))) {
|
||||
furi_crash("TRNG error");
|
||||
}
|
||||
|
||||
uint32_t random_val = LL_RNG_ReadRandData32(RNG);
|
||||
|
||||
LL_RNG_Disable(RNG);
|
||||
LL_HSEM_ReleaseLock(HSEM, CFG_HW_RNG_SEMID, 0);
|
||||
@@ -51,7 +35,15 @@ void furi_hal_random_fill_buf(uint8_t* buf, uint32_t len) {
|
||||
LL_RNG_Enable(RNG);
|
||||
|
||||
for(uint32_t i = 0; i < len; i += 4) {
|
||||
const uint32_t random_val = furi_hal_random_read_rng();
|
||||
while(!LL_RNG_IsActiveFlag_DRDY(RNG))
|
||||
;
|
||||
|
||||
if((LL_RNG_IsActiveFlag_CECS(RNG)) || (LL_RNG_IsActiveFlag_SECS(RNG))) {
|
||||
furi_crash("TRNG error");
|
||||
}
|
||||
|
||||
uint32_t random_val = LL_RNG_ReadRandData32(RNG);
|
||||
|
||||
uint8_t len_cur = ((i + 4) < len) ? (4) : (len - i);
|
||||
memcpy(&buf[i], &random_val, len_cur);
|
||||
}
|
||||
|
||||
@@ -165,14 +165,6 @@ void furi_hal_rtc_init() {
|
||||
FURI_LOG_I(TAG, "Init OK");
|
||||
}
|
||||
|
||||
void furi_hal_rtc_sync_shadow() {
|
||||
if(!LL_RTC_IsShadowRegBypassEnabled(RTC)) {
|
||||
LL_RTC_ClearFlag_RS(RTC);
|
||||
while(!LL_RTC_IsActiveFlag_RS(RTC)) {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t furi_hal_rtc_get_register(FuriHalRtcRegister reg) {
|
||||
return LL_RTC_BAK_GetRegister(RTC, reg);
|
||||
}
|
||||
@@ -320,7 +312,12 @@ void furi_hal_rtc_set_datetime(FuriHalRtcDateTime* datetime) {
|
||||
/* Exit Initialization mode */
|
||||
LL_RTC_DisableInitMode(RTC);
|
||||
|
||||
furi_hal_rtc_sync_shadow();
|
||||
/* If RTC_CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */
|
||||
if(!LL_RTC_IsShadowRegBypassEnabled(RTC)) {
|
||||
LL_RTC_ClearFlag_RS(RTC);
|
||||
while(!LL_RTC_IsActiveFlag_RS(RTC)) {
|
||||
};
|
||||
}
|
||||
|
||||
/* Enable write protection */
|
||||
LL_RTC_EnableWriteProtection(RTC);
|
||||
|
||||
@@ -18,9 +18,6 @@ void furi_hal_debug_enable();
|
||||
/** Disable MCU debug */
|
||||
void furi_hal_debug_disable();
|
||||
|
||||
/** Check if GDB debug session is active */
|
||||
bool furi_hal_debug_is_gdb_session_active();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -58,6 +58,12 @@ void furi_hal_power_insomnia_exit();
|
||||
*/
|
||||
bool furi_hal_power_sleep_available();
|
||||
|
||||
/** Check if deep sleep availble
|
||||
*
|
||||
* @return true if available
|
||||
*/
|
||||
bool furi_hal_power_deep_sleep_available();
|
||||
|
||||
/** Go to sleep
|
||||
*/
|
||||
void furi_hal_power_sleep();
|
||||
|
||||
@@ -87,9 +87,6 @@ void furi_hal_rtc_deinit_early();
|
||||
/** Initialize RTC subsystem */
|
||||
void furi_hal_rtc_init();
|
||||
|
||||
/** Force sync shadow registers */
|
||||
void furi_hal_rtc_sync_shadow();
|
||||
|
||||
/** Get RTC register content
|
||||
*
|
||||
* @param[in] reg The register identifier
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include <furi_hal_console.h>
|
||||
#include <furi_hal_power.h>
|
||||
#include <furi_hal_rtc.h>
|
||||
#include <furi_hal_debug.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <FreeRTOS.h>
|
||||
@@ -118,8 +117,6 @@ FURI_NORETURN void __furi_crash() {
|
||||
if(debug) {
|
||||
furi_hal_console_puts("\r\nSystem halted. Connect debugger for more info\r\n");
|
||||
furi_hal_console_puts("\033[0m\r\n");
|
||||
furi_hal_debug_enable();
|
||||
|
||||
RESTORE_REGISTERS_AND_HALT_MCU(true);
|
||||
} else {
|
||||
furi_hal_rtc_set_fault_data((uint32_t)__furi_check_message);
|
||||
|
||||
@@ -24,10 +24,6 @@ extern "C" {
|
||||
})
|
||||
#endif
|
||||
|
||||
#ifndef ABS
|
||||
#define ABS(a) ({ (a) < 0 ? -(a) : (a); })
|
||||
#endif
|
||||
|
||||
#ifndef ROUND_UP_TO
|
||||
#define ROUND_UP_TO(a, b) \
|
||||
({ \
|
||||
|
||||
Submodule lib/STM32CubeWB updated: 06b8133fa2...a9e29b431f
@@ -14,7 +14,7 @@ IWDGSTOP:0x1:rw
|
||||
IWDGSW:0x1:rw
|
||||
IPCCDBA:0x0:rw
|
||||
ESE:0x1:r
|
||||
SFSA:0xD5:r
|
||||
SFSA:0xD7:r
|
||||
FSD:0x0:r
|
||||
DDS:0x1:r
|
||||
C2OPT:0x1:r
|
||||
@@ -22,7 +22,7 @@ NBRSD:0x0:r
|
||||
SNBRSA:0xD:r
|
||||
BRSD:0x0:r
|
||||
SBRSA:0x12:r
|
||||
SBRV:0x35400:r
|
||||
SBRV:0x35C00:r
|
||||
PCROP1A_STRT:0x1FF:r
|
||||
PCROP1A_END:0x0:r
|
||||
PCROP_RDP:0x1:rw
|
||||
|
||||
@@ -36,7 +36,6 @@ ENV.AppendUnique(
|
||||
],
|
||||
CPPDEFINES=[
|
||||
"_GNU_SOURCE",
|
||||
*GetOption("extra_defines"),
|
||||
],
|
||||
LINKFLAGS=[
|
||||
"-mcpu=cortex-m4",
|
||||
|
||||
@@ -26,14 +26,6 @@ AddOption(
|
||||
help="List of applications to add to firmware's built-ins. Also see FIRMWARE_APP_SET and FIRMWARE_APPS",
|
||||
)
|
||||
|
||||
AddOption(
|
||||
"--extra-define",
|
||||
action="append",
|
||||
dest="extra_defines",
|
||||
default=[],
|
||||
help="Extra global define that will be passed to C/C++ compiler, can be specified multiple times",
|
||||
)
|
||||
|
||||
AddOption(
|
||||
"--extra-ext-apps",
|
||||
action="store",
|
||||
|
||||
Reference in New Issue
Block a user