mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Merge remote-tracking branch 'ofw/dev' into mntm-dev
This commit is contained in:
@@ -11,9 +11,9 @@ AlignConsecutiveAssignments:
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: true
|
||||
AlignConsecutiveBitFields:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
Enabled: true
|
||||
AcrossEmptyLines: true
|
||||
AcrossComments: true
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: true
|
||||
@@ -25,10 +25,10 @@ AlignConsecutiveDeclarations:
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: true
|
||||
AlignConsecutiveMacros:
|
||||
Enabled: false
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AcrossComments: true
|
||||
AlignCompound: true
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: true
|
||||
AlignConsecutiveShortCaseStatements:
|
||||
@@ -47,7 +47,7 @@ AllowBreakBeforeNoexceptSpecifier: Never
|
||||
AllowShortBlocksOnASingleLine: Never
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortCompoundRequirementOnASingleLine: true
|
||||
AllowShortEnumsOnASingleLine: true
|
||||
AllowShortEnumsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortIfStatementsOnASingleLine: WithoutElse
|
||||
AllowShortLambdasOnASingleLine: All
|
||||
@@ -108,6 +108,7 @@ ForEachMacros:
|
||||
- foreach
|
||||
- Q_FOREACH
|
||||
- BOOST_FOREACH
|
||||
- M_EACH
|
||||
IfMacros:
|
||||
- KJ_IF_MAYBE
|
||||
IncludeBlocks: Preserve
|
||||
@@ -136,7 +137,7 @@ IndentRequiresClause: false
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: true
|
||||
InsertBraces: false
|
||||
InsertNewlineAtEOF: false
|
||||
InsertNewlineAtEOF: true
|
||||
InsertTrailingCommas: None
|
||||
IntegerLiteralSeparator:
|
||||
Binary: 0
|
||||
@@ -179,7 +180,7 @@ ReferenceAlignment: Pointer
|
||||
ReflowComments: false
|
||||
RemoveBracesLLVM: false
|
||||
RemoveParentheses: Leave
|
||||
RemoveSemicolon: false
|
||||
RemoveSemicolon: true
|
||||
RequiresClausePosition: OwnLine
|
||||
RequiresExpressionIndentation: OuterScope
|
||||
SeparateDefinitionBlocks: Leave
|
||||
@@ -226,7 +227,7 @@ SpacesInParensOptions:
|
||||
InEmptyParentheses: false
|
||||
Other: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: c++03
|
||||
Standard: c++20
|
||||
StatementAttributeLikeMacros:
|
||||
- Q_EMIT
|
||||
StatementMacros:
|
||||
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -45,12 +45,6 @@ null.d
|
||||
.sconsign.dblite
|
||||
|
||||
|
||||
# Visual Studio Code
|
||||
/.vscode
|
||||
|
||||
# Visual Studio
|
||||
/.vs
|
||||
|
||||
# bundle output
|
||||
/dist
|
||||
|
||||
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -26,9 +26,6 @@
|
||||
[submodule "lib/mbedtls"]
|
||||
path = lib/mbedtls
|
||||
url = https://github.com/Mbed-TLS/mbedtls.git
|
||||
[submodule "lib/cxxheaderparser"]
|
||||
path = lib/cxxheaderparser
|
||||
url = https://github.com/robotpy/cxxheaderparser.git
|
||||
[submodule "lib/heatshrink"]
|
||||
path = lib/heatshrink
|
||||
url = https://github.com/flipperdevices/heatshrink.git
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
{
|
||||
"C_Cpp.default.cStandard": "gnu23",
|
||||
"C_Cpp.default.cppStandard": "c++20",
|
||||
"python.formatting.provider": "black",
|
||||
"workbench.tree.indent": 12,
|
||||
"cortex-debug.enableTelemetry": false,
|
||||
"cortex-debug.variableUseNaturalFormat": true,
|
||||
"cortex-debug.showRTOS": true,
|
||||
"cortex-debug.armToolchainPath": "${workspaceFolder}/toolchain/current/bin",
|
||||
"cortex-debug.openocdPath": "${workspaceFolder}/toolchain/current/bin/openocd",
|
||||
"cortex-debug.gdbPath": "${workspaceFolder}/toolchain/current/bin/arm-none-eabi-gdb-py3",
|
||||
@@ -16,9 +12,9 @@
|
||||
"SConstruct": "python",
|
||||
"*.fam": "python"
|
||||
},
|
||||
"clangd.path": "${workspaceFolder}/toolchain/current/bin/clangd@FBT_PLATFORM_EXECUTABLE_EXT@",
|
||||
"clangd.arguments": [
|
||||
// We might be able to tighten this a bit more to only include the correct toolchain.
|
||||
"--query-driver=**",
|
||||
"--query-driver=**/arm-none-eabi-*",
|
||||
"--compile-commands-dir=${workspaceFolder}/build/latest",
|
||||
"--clang-tidy",
|
||||
"--header-insertion=never"
|
||||
17
SConstruct
17
SConstruct
@@ -43,10 +43,10 @@ distenv = coreenv.Clone(
|
||||
"blackmagic",
|
||||
"jflash",
|
||||
"doxygen",
|
||||
"textfile",
|
||||
],
|
||||
ENV=os.environ,
|
||||
UPDATE_BUNDLE_DIR="dist/${DIST_DIR}/f${TARGET_HW}-update-${DIST_SUFFIX}",
|
||||
VSCODE_LANG_SERVER=ARGUMENTS.get("LANG_SERVER", "cpptools"),
|
||||
)
|
||||
|
||||
firmware_env = distenv.AddFwProject(
|
||||
@@ -403,14 +403,23 @@ distenv.PhonyTarget(
|
||||
)
|
||||
|
||||
# Prepare vscode environment
|
||||
VSCODE_LANG_SERVER = cmd_environment["LANG_SERVER"]
|
||||
vscode_dist = distenv.Install(
|
||||
"#.vscode",
|
||||
[
|
||||
distenv.Glob("#.vscode/example/*.json"),
|
||||
distenv.Glob(f"#.vscode/example/{VSCODE_LANG_SERVER}/*.json"),
|
||||
distenv.Glob("#.vscode/example/*.json", exclude="*.tmpl"),
|
||||
distenv.Glob("#.vscode/example/${LANG_SERVER}/*.json"),
|
||||
],
|
||||
)
|
||||
for template_file in distenv.Glob("#.vscode/example/*.tmpl"):
|
||||
vscode_dist.append(
|
||||
distenv.Substfile(
|
||||
distenv.Dir("#.vscode").File(template_file.name.replace(".tmpl", "")),
|
||||
template_file,
|
||||
SUBST_DICT={
|
||||
"@FBT_PLATFORM_EXECUTABLE_EXT@": ".exe" if os.name == "nt" else ""
|
||||
},
|
||||
)
|
||||
)
|
||||
distenv.Precious(vscode_dist)
|
||||
distenv.NoClean(vscode_dist)
|
||||
distenv.Alias("vscode_dist", (vscode_dist, firmware_env["FW_CDB"]))
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <gui/elements.h>
|
||||
#include <assets_icons.h>
|
||||
|
||||
#define LOW_CHARGE_THRESHOLD 10
|
||||
#define LOW_CHARGE_THRESHOLD 10
|
||||
#define HIGH_DRAIN_CURRENT_THRESHOLD 100
|
||||
|
||||
struct BatteryInfo {
|
||||
|
||||
@@ -39,7 +39,7 @@ typedef struct {
|
||||
} BtTestModel;
|
||||
|
||||
#define BT_TEST_START_MESSAGE "Ok - Start"
|
||||
#define BT_TEST_STOP_MESSAGE "Ok - Stop"
|
||||
#define BT_TEST_STOP_MESSAGE "Ok - Stop"
|
||||
|
||||
static void bt_test_process_up(BtTest* bt_test);
|
||||
static void bt_test_process_down(BtTest* bt_test);
|
||||
|
||||
@@ -18,4 +18,4 @@ void iso7816_xfr_datablock_callback(
|
||||
const uint8_t* dataBlock,
|
||||
uint32_t dataBlockLen,
|
||||
uint8_t* responseDataBlock,
|
||||
uint32_t* responseDataBlockLen);
|
||||
uint32_t* responseDataBlockLen);
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
void iso7816_set_response(ISO7816_Response_APDU* responseAPDU, uint16_t responseCode) {
|
||||
responseAPDU->SW1 = (responseCode >> (8 * 1)) & 0xff;
|
||||
responseAPDU->SW2 = (responseCode >> (8 * 0)) & 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
#define ISO7816_RESPONSE_OK 0x9000
|
||||
|
||||
#define ISO7816_RESPONSE_WRONG_LENGTH 0x6700
|
||||
#define ISO7816_RESPONSE_WRONG_PARAMETERS_P1_P2 0x6A00
|
||||
#define ISO7816_RESPONSE_WRONG_LE 0x6C00
|
||||
#define ISO7816_RESPONSE_WRONG_LENGTH 0x6700
|
||||
#define ISO7816_RESPONSE_WRONG_PARAMETERS_P1_P2 0x6A00
|
||||
#define ISO7816_RESPONSE_WRONG_LE 0x6C00
|
||||
#define ISO7816_RESPONSE_INSTRUCTION_NOT_SUPPORTED 0x6D00
|
||||
#define ISO7816_RESPONSE_CLASS_NOT_SUPPORTED 0x6E00
|
||||
#define ISO7816_RESPONSE_INTERNAL_EXCEPTION 0x6F00
|
||||
#define ISO7816_RESPONSE_CLASS_NOT_SUPPORTED 0x6E00
|
||||
#define ISO7816_RESPONSE_INTERNAL_EXCEPTION 0x6F00
|
||||
|
||||
void iso7816_set_response(ISO7816_Response_APDU* responseAPDU, uint16_t responseCode);
|
||||
void iso7816_set_response(ISO7816_Response_APDU* responseAPDU, uint16_t responseCode);
|
||||
|
||||
@@ -81,4 +81,4 @@ void iso7816_write_response_apdu(
|
||||
responseDataBufferIndex++;
|
||||
|
||||
*readerToPcDataBlockLen = responseDataBufferIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include "iso7816_atr.h"
|
||||
#include "core/common_defines.h"
|
||||
|
||||
#define ISO7816_READ_COMMAND_APDU_OK 0
|
||||
#define ISO7816_READ_COMMAND_APDU_ERROR_WRONG_LE 1
|
||||
#define ISO7816_READ_COMMAND_APDU_OK 0
|
||||
#define ISO7816_READ_COMMAND_APDU_ERROR_WRONG_LE 1
|
||||
#define ISO7816_READ_COMMAND_APDU_ERROR_WRONG_LENGTH 2
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
|
||||
#define TAG "ExpansionTest"
|
||||
|
||||
#define TEST_DIR_PATH EXT_PATH(TAG)
|
||||
#define TEST_DIR_PATH EXT_PATH(TAG)
|
||||
#define TEST_FILE_NAME "test.txt"
|
||||
#define TEST_FILE_PATH EXT_PATH(TAG "/" TEST_FILE_NAME)
|
||||
|
||||
#define HOST_SERIAL_ID (FuriHalSerialIdLpuart)
|
||||
#define HOST_SERIAL_ID (FuriHalSerialIdLpuart)
|
||||
#define MODULE_SERIAL_ID (FuriHalSerialIdUsart)
|
||||
|
||||
#define RECEIVE_BUFFER_SIZE (sizeof(ExpansionFrame) + sizeof(ExpansionFrameChecksum))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <furi.h>
|
||||
|
||||
#define DEFAULT_PATH "/"
|
||||
#define EXTENSION "*"
|
||||
#define EXTENSION "*"
|
||||
|
||||
bool file_browser_scene_browser_on_event(void* context, SceneManagerEvent event) {
|
||||
UNUSED(context);
|
||||
|
||||
@@ -78,4 +78,4 @@ int32_t lfrfid_debug_app(void* p) {
|
||||
lfrfid_debug_free(app);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <toolbox/args.h>
|
||||
|
||||
#define TAG "SpeakerDebug"
|
||||
|
||||
#define CLI_COMMAND "speaker_debug"
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include <furi_hal.h>
|
||||
|
||||
#define SUBGHZ_TEST_VERSION_APP "0.1"
|
||||
#define SUBGHZ_TEST_DEVELOPED "SkorP"
|
||||
#define SUBGHZ_TEST_GITHUB "https://github.com/flipperdevices/flipperzero-firmware"
|
||||
#define SUBGHZ_TEST_DEVELOPED "SkorP"
|
||||
#define SUBGHZ_TEST_GITHUB "https://github.com/flipperdevices/flipperzero-firmware"
|
||||
|
||||
typedef enum {
|
||||
SubGhzTestViewVariableItemList,
|
||||
|
||||
@@ -241,4 +241,4 @@ uint8_t subghz_protocol_blocks_xor_bytes(uint8_t const message[], size_t size) {
|
||||
result ^= message[i];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
(value) &= ~(_one << (bit)); \
|
||||
})
|
||||
#define bit_write(value, bit, bitvalue) (bitvalue ? bit_set(value, bit) : bit_clear(value, bit))
|
||||
#define DURATION_DIFF(x, y) (((x) < (y)) ? ((y) - (x)) : ((x) - (y)))
|
||||
#define DURATION_DIFF(x, y) (((x) < (y)) ? ((y) - (x)) : ((x) - (y)))
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#define SUBGHZ_PT_SHORT 300
|
||||
#define SUBGHZ_PT_LONG (SUBGHZ_PT_SHORT * 3)
|
||||
#define SUBGHZ_PT_GUARD (SUBGHZ_PT_SHORT * 30)
|
||||
#define SUBGHZ_PT_SHORT 300
|
||||
#define SUBGHZ_PT_LONG (SUBGHZ_PT_SHORT * 3)
|
||||
#define SUBGHZ_PT_GUARD (SUBGHZ_PT_SHORT * 30)
|
||||
#define SUBGHZ_PT_COUNT_KEY_433 9
|
||||
#define SUBGHZ_PT_TIMEOUT_433 900
|
||||
#define SUBGHZ_PT_TIMEOUT_433 900
|
||||
#define SUBGHZ_PT_COUNT_KEY_868 9
|
||||
#define SUBGHZ_PT_TIMEOUT_868 14000
|
||||
#define SUBGHZ_PT_TIMEOUT_868 14000
|
||||
|
||||
#define TAG "SubGhzProtocolPrinceton"
|
||||
|
||||
|
||||
@@ -9,9 +9,10 @@
|
||||
#include <notification/notification.h>
|
||||
#include <notification/notification_messages.h>
|
||||
|
||||
#define LINES_ON_SCREEN 6
|
||||
#define COLUMNS_ON_SCREEN 21
|
||||
#define TAG "UartEcho"
|
||||
|
||||
#define LINES_ON_SCREEN 6
|
||||
#define COLUMNS_ON_SCREEN 21
|
||||
#define DEFAULT_BAUD_RATE 230400
|
||||
|
||||
typedef struct UartDumpModel UartDumpModel;
|
||||
@@ -147,7 +148,7 @@ static void uart_echo_push_to_list(UartDumpModel* model, const char data) {
|
||||
bool new_string_needed = false;
|
||||
if(furi_string_size(model->list[model->line]->text) >= COLUMNS_ON_SCREEN) {
|
||||
new_string_needed = true;
|
||||
} else if((data == '\n' || data == '\r')) {
|
||||
} else if(data == '\n' || data == '\r') {
|
||||
// pack line breaks
|
||||
if(model->last_char != '\n' && model->last_char != '\r') {
|
||||
new_string_needed = true;
|
||||
|
||||
@@ -76,7 +76,7 @@ void test_runner_free(TestRunner* instance) {
|
||||
free(instance);
|
||||
}
|
||||
|
||||
#define TEST_RUNNER_TMP_DIR EXT_PATH(".tmp")
|
||||
#define TEST_RUNNER_TMP_DIR EXT_PATH(".tmp")
|
||||
#define TEST_RUNNER_TMP_UNIT_TESTS_DIR TEST_RUNNER_TMP_DIR "/unit_tests"
|
||||
|
||||
static bool test_runner_run_plugin(TestRunner* instance, const char* path) {
|
||||
|
||||
@@ -9,4 +9,4 @@ TestRunner* test_runner_alloc(Cli* cli, FuriString* args);
|
||||
|
||||
void test_runner_free(TestRunner* isntance);
|
||||
|
||||
void test_runner_run(TestRunner* isntance);
|
||||
void test_runner_run(TestRunner* isntance);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <storage/storage.h>
|
||||
|
||||
#define BT_TEST_KEY_STORAGE_FILE_PATH EXT_PATH("unit_tests/bt_test.keys")
|
||||
#define BT_TEST_NVM_RAM_BUFF_SIZE (507 * 4) // The same as in ble NVM storage
|
||||
#define BT_TEST_NVM_RAM_BUFF_SIZE (507 * 4) // The same as in ble NVM storage
|
||||
|
||||
typedef struct {
|
||||
Storage* storage;
|
||||
|
||||
@@ -173,7 +173,7 @@ It was compressed with heatshrink using the following command:
|
||||
`python3 -m heatshrink2 compress -w 9 -l 4 hsstream.out.bin hsstream.in.bin`
|
||||
*/
|
||||
|
||||
#define HSSTREAM_IN COMPRESS_UNIT_TESTS_PATH("hsstream.in.bin")
|
||||
#define HSSTREAM_IN COMPRESS_UNIT_TESTS_PATH("hsstream.in.bin")
|
||||
#define HSSTREAM_OUT COMPRESS_UNIT_TESTS_PATH("hsstream.out.bin")
|
||||
|
||||
static void compress_test_heatshrink_stream() {
|
||||
@@ -239,7 +239,7 @@ static void compress_test_heatshrink_stream() {
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
}
|
||||
|
||||
#define HS_TAR_PATH COMPRESS_UNIT_TESTS_PATH("test.ths")
|
||||
#define HS_TAR_PATH COMPRESS_UNIT_TESTS_PATH("test.ths")
|
||||
#define HS_TAR_EXTRACT_PATH COMPRESS_UNIT_TESTS_PATH("tar_out")
|
||||
|
||||
static bool file_counter(const char* name, bool is_dir, void* context) {
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
#include <expansion/expansion_protocol.h>
|
||||
|
||||
#define EXPANSION_TEST_GARBAGE_MAGIC (0xB19AF)
|
||||
#define EXPANSION_TEST_GARBAGE_BUF_SIZE (0x100U)
|
||||
#define EXPANSION_TEST_GARBAGE_MAGIC (0xB19AF)
|
||||
#define EXPANSION_TEST_GARBAGE_BUF_SIZE (0x100U)
|
||||
#define EXPANSION_TEST_GARBAGE_ITERATIONS (100U)
|
||||
|
||||
MU_TEST(test_expansion_encoded_size) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "../test.h" // IWYU pragma: keep
|
||||
|
||||
#define TEST_DIR_NAME EXT_PATH(".tmp/unit_tests/ff")
|
||||
#define TEST_DIR TEST_DIR_NAME "/"
|
||||
#define TEST_DIR TEST_DIR_NAME "/"
|
||||
|
||||
static const char* test_filetype = "Flipper File test";
|
||||
static const uint32_t test_version = 666;
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
#include <lp5562_reg.h>
|
||||
#include "../test.h" // IWYU pragma: keep
|
||||
|
||||
#define DATA_SIZE 4
|
||||
#define EEPROM_ADDRESS 0b10101000
|
||||
#define EEPROM_ADDRESS_HIGH (EEPROM_ADDRESS | 0b10)
|
||||
#define EEPROM_SIZE 512
|
||||
#define EEPROM_PAGE_SIZE 16
|
||||
#define DATA_SIZE 4
|
||||
#define EEPROM_ADDRESS 0b10101000
|
||||
#define EEPROM_ADDRESS_HIGH (EEPROM_ADDRESS | 0b10)
|
||||
#define EEPROM_SIZE 512
|
||||
#define EEPROM_PAGE_SIZE 16
|
||||
#define EEPROM_WRITE_DELAY_MS 6
|
||||
|
||||
static void furi_hal_i2c_int_setup(void) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <common/infrared_common_i.h>
|
||||
#include "../test.h" // IWYU pragma: keep
|
||||
|
||||
#define IR_TEST_FILES_DIR EXT_PATH("unit_tests/infrared/")
|
||||
#define IR_TEST_FILES_DIR EXT_PATH("unit_tests/infrared/")
|
||||
#define IR_TEST_FILE_PREFIX "test_"
|
||||
#define IR_TEST_FILE_SUFFIX ".irtest"
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
#define LF_RFID_READ_TIMING_MULTIPLIER 8
|
||||
|
||||
#define EM_TEST_DATA {0x58, 0x00, 0x85, 0x64, 0x02}
|
||||
#define EM_TEST_DATA_SIZE 5
|
||||
#define EM_TEST_DATA {0x58, 0x00, 0x85, 0x64, 0x02}
|
||||
#define EM_TEST_DATA_SIZE 5
|
||||
#define EM_TEST_EMULATION_TIMINGS_COUNT (64 * 2)
|
||||
|
||||
const int8_t em_test_timings[EM_TEST_EMULATION_TIMINGS_COUNT] = {
|
||||
@@ -20,8 +20,8 @@ const int8_t em_test_timings[EM_TEST_EMULATION_TIMINGS_COUNT] = {
|
||||
-32, 32, 32, -32, -32, 32, -32, 32, -32, 32, -32, 32, -32, 32,
|
||||
};
|
||||
|
||||
#define HID10301_TEST_DATA {0x8D, 0x48, 0xA8}
|
||||
#define HID10301_TEST_DATA_SIZE 3
|
||||
#define HID10301_TEST_DATA {0x8D, 0x48, 0xA8}
|
||||
#define HID10301_TEST_DATA_SIZE 3
|
||||
#define HID10301_TEST_EMULATION_TIMINGS_COUNT (541 * 2)
|
||||
|
||||
const int8_t hid10301_test_timings[HID10301_TEST_EMULATION_TIMINGS_COUNT] = {
|
||||
@@ -69,8 +69,8 @@ const int8_t hid10301_test_timings[HID10301_TEST_EMULATION_TIMINGS_COUNT] = {
|
||||
5, -5, 4, -4, 4, -4, 4, -4, 4, -4, 4, -4, 4, -4, 4, -4,
|
||||
};
|
||||
|
||||
#define IOPROX_XSF_TEST_DATA {0x65, 0x01, 0x05, 0x39}
|
||||
#define IOPROX_XSF_TEST_DATA_SIZE 4
|
||||
#define IOPROX_XSF_TEST_DATA {0x65, 0x01, 0x05, 0x39}
|
||||
#define IOPROX_XSF_TEST_DATA_SIZE 4
|
||||
#define IOPROX_XSF_TEST_EMULATION_TIMINGS_COUNT (468 * 2)
|
||||
|
||||
const int8_t ioprox_xsf_test_timings[IOPROX_XSF_TEST_EMULATION_TIMINGS_COUNT] = {
|
||||
@@ -113,8 +113,8 @@ const int8_t ioprox_xsf_test_timings[IOPROX_XSF_TEST_EMULATION_TIMINGS_COUNT] =
|
||||
};
|
||||
|
||||
#define INDALA26_EMULATION_TIMINGS_COUNT (1024 * 2)
|
||||
#define INDALA26_TEST_DATA {0x3B, 0x73, 0x64, 0xA8}
|
||||
#define INDALA26_TEST_DATA_SIZE 4
|
||||
#define INDALA26_TEST_DATA {0x3B, 0x73, 0x64, 0xA8}
|
||||
#define INDALA26_TEST_DATA_SIZE 4
|
||||
|
||||
const int8_t indala26_test_timings[INDALA26_EMULATION_TIMINGS_COUNT] = {
|
||||
1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1,
|
||||
@@ -205,8 +205,8 @@ const int8_t indala26_test_timings[INDALA26_EMULATION_TIMINGS_COUNT] = {
|
||||
-1, 1, -1, 1, -1, 1, -1, 1,
|
||||
};
|
||||
|
||||
#define FDXB_TEST_DATA {0x44, 0x88, 0x23, 0xF2, 0x5A, 0x6F, 0x00, 0x01, 0x00, 0x00, 0x00}
|
||||
#define FDXB_TEST_DATA_SIZE 11
|
||||
#define FDXB_TEST_DATA {0x44, 0x88, 0x23, 0xF2, 0x5A, 0x6F, 0x00, 0x01, 0x00, 0x00, 0x00}
|
||||
#define FDXB_TEST_DATA_SIZE 11
|
||||
#define FDXB_TEST_EMULATION_TIMINGS_COUNT (206)
|
||||
|
||||
const int8_t fdxb_test_timings[FDXB_TEST_EMULATION_TIMINGS_COUNT] = {
|
||||
|
||||
@@ -71,7 +71,7 @@ extern "C" {
|
||||
/* Maximum length of last message */
|
||||
#define MINUNIT_MESSAGE_LEN 1024
|
||||
/* Accuracy with which floats are compared */
|
||||
#define MINUNIT_EPSILON 1E-12
|
||||
#define MINUNIT_EPSILON 1E-12
|
||||
|
||||
#include "minunit_vars_ex.h"
|
||||
|
||||
@@ -84,9 +84,9 @@ void minunit_print_fail(const char* error);
|
||||
void minunit_printf_warning(const char* format, ...);
|
||||
|
||||
/* Definitions */
|
||||
#define MU_TEST(method_name) static void method_name(void)
|
||||
#define MU_TEST(method_name) static void method_name(void)
|
||||
#define MU_TEST_1(method_name, arg_1) static void method_name(arg_1)
|
||||
#define MU_TEST_SUITE(suite_name) static void suite_name(void)
|
||||
#define MU_TEST_SUITE(suite_name) static void suite_name(void)
|
||||
|
||||
#define MU__SAFE_BLOCK(block) \
|
||||
do { \
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#define TAG "NfcTest"
|
||||
|
||||
#define NFC_TEST_NFC_DEV_PATH EXT_PATH("unit_tests/nfc/nfc_device_test.nfc")
|
||||
#define NFC_TEST_NFC_DEV_PATH EXT_PATH("unit_tests/nfc/nfc_device_test.nfc")
|
||||
#define NFC_APP_MF_CLASSIC_DICT_UNIT_TEST_PATH EXT_PATH("unit_tests/mf_dict.nfc")
|
||||
|
||||
#define NFC_TEST_FLAG_WORKER_DONE (1)
|
||||
|
||||
@@ -43,14 +43,15 @@ typedef struct {
|
||||
static RpcSessionContext rpc_session[TEST_RPC_SESSIONS];
|
||||
|
||||
#define TAG "UnitTestsRpc"
|
||||
#define MAX_RECEIVE_OUTPUT_TIMEOUT 3000
|
||||
#define MAX_NAME_LENGTH 254
|
||||
#define MAX_DATA_SIZE 512u // have to be exact as in rpc_storage.c
|
||||
#define TEST_DIR_NAME EXT_PATH(".tmp/unit_tests/rpc")
|
||||
#define TEST_DIR TEST_DIR_NAME "/"
|
||||
#define MD5SUM_SIZE 16
|
||||
|
||||
#define PING_REQUEST 0
|
||||
#define MAX_RECEIVE_OUTPUT_TIMEOUT 3000
|
||||
#define MAX_NAME_LENGTH 254
|
||||
#define MAX_DATA_SIZE 512u // have to be exact as in rpc_storage.c
|
||||
#define TEST_DIR_NAME EXT_PATH(".tmp/unit_tests/rpc")
|
||||
#define TEST_DIR TEST_DIR_NAME "/"
|
||||
#define MD5SUM_SIZE 16
|
||||
|
||||
#define PING_REQUEST 0
|
||||
#define PING_RESPONSE 1
|
||||
#define WRITE_REQUEST 0
|
||||
#define READ_RESPONSE 1
|
||||
@@ -554,7 +555,7 @@ static bool test_rpc_pb_stream_read(pb_istream_t* istream, pb_byte_t* buf, size_
|
||||
time_left = MAX(time_left, 0);
|
||||
bytes_received =
|
||||
furi_stream_buffer_receive(session_context->output_stream, buf, count, time_left);
|
||||
return (count == bytes_received);
|
||||
return count == bytes_received;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -971,7 +972,7 @@ MU_TEST(test_storage_info) {
|
||||
}
|
||||
|
||||
#define TEST_DIR_STAT_NAME TEST_DIR "stat_dir"
|
||||
#define TEST_DIR_STAT TEST_DIR_STAT_NAME "/"
|
||||
#define TEST_DIR_STAT TEST_DIR_STAT_NAME "/"
|
||||
MU_TEST(test_storage_stat) {
|
||||
test_create_dir(TEST_DIR_STAT_NAME);
|
||||
test_create_file(TEST_DIR_STAT "empty.txt", 0);
|
||||
@@ -1212,7 +1213,7 @@ static void test_storage_delete_run(
|
||||
}
|
||||
|
||||
#define TEST_DIR_RMRF_NAME TEST_DIR "rmrf_test"
|
||||
#define TEST_DIR_RMRF TEST_DIR_RMRF_NAME "/"
|
||||
#define TEST_DIR_RMRF TEST_DIR_RMRF_NAME "/"
|
||||
MU_TEST(test_storage_delete_recursive) {
|
||||
test_create_dir(TEST_DIR_RMRF_NAME);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define UNIT_TESTS_PATH(path) EXT_PATH("unit_tests/" path)
|
||||
|
||||
#define STORAGE_LOCKED_FILE EXT_PATH("locked_file.test")
|
||||
#define STORAGE_LOCKED_DIR STORAGE_INT_PATH_PREFIX
|
||||
#define STORAGE_LOCKED_DIR STORAGE_INT_PATH_PREFIX
|
||||
|
||||
#define STORAGE_TEST_DIR UNIT_TESTS_PATH("test_dir")
|
||||
|
||||
|
||||
@@ -11,13 +11,14 @@
|
||||
#include <lib/subghz/devices/cc1101_configs.h>
|
||||
|
||||
#define TAG "SubGhzTest"
|
||||
#define KEYSTORE_DIR_NAME EXT_PATH("subghz/assets/keeloq_mfcodes")
|
||||
#define CAME_ATOMO_DIR_NAME EXT_PATH("subghz/assets/came_atomo")
|
||||
#define NICE_FLOR_S_DIR_NAME EXT_PATH("subghz/assets/nice_flor_s")
|
||||
#define ALUTECH_AT_4N_DIR_NAME EXT_PATH("subghz/assets/alutech_at_4n")
|
||||
#define TEST_RANDOM_DIR_NAME EXT_PATH("unit_tests/subghz/test_random_raw.sub")
|
||||
|
||||
#define KEYSTORE_DIR_NAME EXT_PATH("subghz/assets/keeloq_mfcodes")
|
||||
#define CAME_ATOMO_DIR_NAME EXT_PATH("subghz/assets/came_atomo")
|
||||
#define NICE_FLOR_S_DIR_NAME EXT_PATH("subghz/assets/nice_flor_s")
|
||||
#define ALUTECH_AT_4N_DIR_NAME EXT_PATH("subghz/assets/alutech_at_4n")
|
||||
#define TEST_RANDOM_DIR_NAME EXT_PATH("unit_tests/subghz/test_random_raw.sub")
|
||||
#define TEST_RANDOM_COUNT_PARSE 329
|
||||
#define TEST_TIMEOUT 10000
|
||||
#define TEST_TIMEOUT 10000
|
||||
|
||||
static SubGhzEnvironment* environment_handler;
|
||||
static SubGhzReceiver* receiver_handler;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <flipper_application/flipper_application.h>
|
||||
|
||||
#define APPID "UnitTest"
|
||||
#define APPID "UnitTest"
|
||||
#define API_VERSION (0u)
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <input/input.h>
|
||||
|
||||
#define MOUSE_MOVE_SHORT 5
|
||||
#define MOUSE_MOVE_LONG 20
|
||||
#define MOUSE_MOVE_LONG 20
|
||||
|
||||
typedef enum {
|
||||
EventTypeInput,
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
#define SUBGHZ_DEVICE_CC1101_CONFIG_VER 1
|
||||
|
||||
/* DMA Channels definition */
|
||||
#define SUBGHZ_DEVICE_CC1101_EXT_DMA (DMA2)
|
||||
#define SUBGHZ_DEVICE_CC1101_EXT_DMA (DMA2)
|
||||
#define SUBGHZ_DEVICE_CC1101_EXT_DMA_CH3_CHANNEL (LL_DMA_CHANNEL_3)
|
||||
#define SUBGHZ_DEVICE_CC1101_EXT_DMA_CH4_CHANNEL (LL_DMA_CHANNEL_4)
|
||||
#define SUBGHZ_DEVICE_CC1101_EXT_DMA_CH5_CHANNEL (LL_DMA_CHANNEL_5)
|
||||
#define SUBGHZ_DEVICE_CC1101_EXT_DMA_CH3_IRQ (FuriHalInterruptIdDma2Ch3)
|
||||
#define SUBGHZ_DEVICE_CC1101_EXT_DMA_CH3_IRQ (FuriHalInterruptIdDma2Ch3)
|
||||
#define SUBGHZ_DEVICE_CC1101_EXT_DMA_CH3_DEF \
|
||||
SUBGHZ_DEVICE_CC1101_EXT_DMA, SUBGHZ_DEVICE_CC1101_EXT_DMA_CH3_CHANNEL
|
||||
#define SUBGHZ_DEVICE_CC1101_EXT_DMA_CH4_DEF \
|
||||
@@ -411,7 +411,7 @@ bool subghz_device_cc1101_ext_is_rx_data_crc_valid(void) {
|
||||
cc1101_read_reg(
|
||||
subghz_device_cc1101_ext->spi_bus_handle, CC1101_STATUS_LQI | CC1101_BURST, data);
|
||||
furi_hal_spi_release(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
if(((data[0] >> 7) & 0x01)) {
|
||||
if((data[0] >> 7) & 0x01) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -917,9 +917,8 @@ bool subghz_device_cc1101_ext_start_async_tx(SubGhzDeviceCC1101ExtCallback callb
|
||||
}
|
||||
|
||||
bool subghz_device_cc1101_ext_is_async_tx_complete(void) {
|
||||
return (
|
||||
(subghz_device_cc1101_ext->state == SubGhzDeviceCC1101ExtStateAsyncTx) &&
|
||||
(LL_TIM_GetAutoReload(TIM17) == 0));
|
||||
return (subghz_device_cc1101_ext->state == SubGhzDeviceCC1101ExtStateAsyncTx) &&
|
||||
(LL_TIM_GetAutoReload(TIM17) == 0);
|
||||
}
|
||||
|
||||
void subghz_device_cc1101_ext_stop_async_tx(void) {
|
||||
|
||||
@@ -109,4 +109,4 @@ static const FlipperAppPluginDescriptor subghz_device_cc1101_ext_descriptor = {
|
||||
|
||||
const FlipperAppPluginDescriptor* subghz_device_cc1101_ext_ep(void) {
|
||||
return &subghz_device_cc1101_ext_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#define TAG "ble_beacon_app"
|
||||
#define TAG "BleBeaconApp"
|
||||
|
||||
static bool ble_beacon_app_custom_event_callback(void* context, uint32_t event) {
|
||||
furi_assert(context);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define PLUGIN_APP_ID "example_plugins"
|
||||
#define PLUGIN_APP_ID "example_plugins"
|
||||
#define PLUGIN_API_VERSION 1
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
* Resolver interface with private application's symbols.
|
||||
* Implementation is contained in app_api_table.c
|
||||
*/
|
||||
extern const ElfApiInterface* const application_api_interface;
|
||||
extern const ElfApiInterface* const application_api_interface;
|
||||
|
||||
@@ -10,4 +10,4 @@ static constexpr auto app_api_table = sort(create_array_t<sym_entry>(
|
||||
API_METHOD(app_api_accumulator_get, uint32_t, ()),
|
||||
API_METHOD(app_api_accumulator_add, void, (uint32_t)),
|
||||
API_METHOD(app_api_accumulator_sub, void, (uint32_t)),
|
||||
API_METHOD(app_api_accumulator_mul, void, (uint32_t))));
|
||||
API_METHOD(app_api_accumulator_mul, void, (uint32_t))));
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define PLUGIN_APP_ID "example_plugins_advanced"
|
||||
#define PLUGIN_APP_ID "example_plugins_advanced"
|
||||
#define PLUGIN_API_VERSION 1
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -25,15 +25,15 @@
|
||||
#include <furi_hal_power.h>
|
||||
|
||||
#define UPDATE_PERIOD_MS 1000UL
|
||||
#define TEXT_STORE_SIZE 64U
|
||||
#define TEXT_STORE_SIZE 64U
|
||||
|
||||
#define DS18B20_CMD_SKIP_ROM 0xccU
|
||||
#define DS18B20_CMD_CONVERT 0x44U
|
||||
#define DS18B20_CMD_SKIP_ROM 0xccU
|
||||
#define DS18B20_CMD_CONVERT 0x44U
|
||||
#define DS18B20_CMD_READ_SCRATCHPAD 0xbeU
|
||||
|
||||
#define DS18B20_CFG_RESOLUTION_POS 5U
|
||||
#define DS18B20_CFG_RESOLUTION_POS 5U
|
||||
#define DS18B20_CFG_RESOLUTION_MASK 0x03U
|
||||
#define DS18B20_DECIMAL_PART_MASK 0x0fU
|
||||
#define DS18B20_DECIMAL_PART_MASK 0x0fU
|
||||
|
||||
#define DS18B20_SIGN_MASK 0xf0U
|
||||
|
||||
|
||||
@@ -385,7 +385,7 @@ bool archive_is_home(ArchiveBrowserView* browser) {
|
||||
}
|
||||
|
||||
const char* default_path = archive_get_default_path(archive_get_tab(browser));
|
||||
return (furi_string_cmp_str(browser->path, default_path) == 0);
|
||||
return furi_string_cmp_str(browser->path, default_path) == 0;
|
||||
}
|
||||
|
||||
const char* archive_get_name(ArchiveBrowserView* browser) {
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#include "../archive_i.h"
|
||||
#include <storage/storage.h>
|
||||
|
||||
#define TAB_LEFT InputKeyLeft // Default tab switch direction
|
||||
#define TAB_DEFAULT ArchiveTabFavorites // Start tab
|
||||
#define TAB_LEFT InputKeyLeft // Default tab switch direction
|
||||
#define TAB_DEFAULT ArchiveTabFavorites // Start tab
|
||||
#define FILE_LIST_BUF_LEN 50
|
||||
|
||||
static const char* tab_default_paths[] = {
|
||||
@@ -77,7 +77,7 @@ static inline const char* archive_get_default_path(ArchiveTabEnum tab) {
|
||||
}
|
||||
|
||||
inline bool archive_is_known_app(ArchiveFileTypeEnum type) {
|
||||
return (type < ArchiveFileTypeUnknown);
|
||||
return type < ArchiveFileTypeUnknown;
|
||||
}
|
||||
|
||||
bool archive_is_item_in_array(ArchiveBrowserViewModel* model, uint32_t idx);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <storage/storage.h>
|
||||
|
||||
#define ARCHIVE_FAV_PATH ANY_PATH("favorites.txt")
|
||||
#define ARCHIVE_FAV_PATH ANY_PATH("favorites.txt")
|
||||
#define ARCHIVE_FAV_TEMP_PATH ANY_PATH("favorites.tmp")
|
||||
|
||||
uint16_t archive_favorites_count(void);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#define TAG "ArchiveSceneBrowser"
|
||||
|
||||
#define SCENE_STATE_DEFAULT (0)
|
||||
#define SCENE_STATE_DEFAULT (0)
|
||||
#define SCENE_STATE_NEED_REFRESH (1)
|
||||
|
||||
const char* archive_get_flipper_app_name(ArchiveFileTypeEnum file_type) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "../helpers/archive_browser.h"
|
||||
|
||||
#define SCROLL_INTERVAL (333)
|
||||
#define SCROLL_DELAY (2)
|
||||
#define SCROLL_DELAY (2)
|
||||
|
||||
static const char* ArchiveTabNames[] = {
|
||||
[ArchiveTabFavorites] = "Favorites",
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
#include "../helpers/archive_favorites.h"
|
||||
#include "gui/modules/file_browser_worker.h"
|
||||
|
||||
#define MAX_LEN_PX 110
|
||||
#define MAX_LEN_PX 110
|
||||
#define MAX_NAME_LEN 254
|
||||
#define FRAME_HEIGHT 12
|
||||
#define MENU_ITEMS 5u
|
||||
#define MOVE_OFFSET 5u
|
||||
#define MENU_ITEMS 5u
|
||||
#define MOVE_OFFSET 5u
|
||||
|
||||
typedef enum {
|
||||
ArchiveTabFavorites,
|
||||
|
||||
@@ -8,10 +8,10 @@ extern "C" {
|
||||
#include <furi_hal.h>
|
||||
#include "ducky_script.h"
|
||||
|
||||
#define SCRIPT_STATE_ERROR (-1)
|
||||
#define SCRIPT_STATE_END (-2)
|
||||
#define SCRIPT_STATE_NEXT_LINE (-3)
|
||||
#define SCRIPT_STATE_CMD_UNKNOWN (-4)
|
||||
#define SCRIPT_STATE_ERROR (-1)
|
||||
#define SCRIPT_STATE_END (-2)
|
||||
#define SCRIPT_STATE_NEXT_LINE (-3)
|
||||
#define SCRIPT_STATE_CMD_UNKNOWN (-4)
|
||||
#define SCRIPT_STATE_STRING_START (-5)
|
||||
#define SCRIPT_STATE_WAIT_FOR_BTN (-6)
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
#include <stm32wbxx_ll_lpuart.h>
|
||||
#include <stm32wbxx_ll_usart.h>
|
||||
|
||||
#define USB_CDC_PKT_LEN CDC_DATA_SZ
|
||||
#define USB_CDC_PKT_LEN CDC_DATA_SZ
|
||||
#define USB_UART_RX_BUF_SIZE (USB_CDC_PKT_LEN * 5)
|
||||
|
||||
#define USB_CDC_BIT_DTR (1 << 0)
|
||||
#define USB_CDC_BIT_RTS (1 << 1)
|
||||
#define USB_CDC_BIT_DTR (1 << 0)
|
||||
#define USB_CDC_BIT_RTS (1 << 1)
|
||||
#define USB_USART_DE_RE_PIN &gpio_ext_pa4
|
||||
|
||||
static const GpioPin* flow_pins[][2] = {
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
#include "ibutton_custom_event.h"
|
||||
#include "scenes/ibutton_scene.h"
|
||||
|
||||
#define IBUTTON_APP_FOLDER ANY_PATH("ibutton")
|
||||
#define IBUTTON_APP_FILENAME_PREFIX "iBtn"
|
||||
#define IBUTTON_APP_FOLDER ANY_PATH("ibutton")
|
||||
#define IBUTTON_APP_FILENAME_PREFIX "iBtn"
|
||||
#define IBUTTON_APP_FILENAME_EXTENSION ".ibtn"
|
||||
|
||||
#define IBUTTON_KEY_NAME_SIZE 29
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#define TAG "InfraredApp"
|
||||
|
||||
#define INFRARED_TX_MIN_INTERVAL_MS (50U)
|
||||
#define INFRARED_TASK_STACK_SIZE (2048UL)
|
||||
#define INFRARED_TASK_STACK_SIZE (2048UL)
|
||||
|
||||
static const NotificationSequence*
|
||||
infrared_notification_sequences[InfraredNotificationMessageCount] = {
|
||||
|
||||
@@ -39,18 +39,18 @@
|
||||
#include "views/infrared_debug_view.h"
|
||||
#include "views/infrared_move_view.h"
|
||||
|
||||
#define INFRARED_FILE_NAME_SIZE 100
|
||||
#define INFRARED_TEXT_STORE_NUM 2
|
||||
#define INFRARED_FILE_NAME_SIZE 100
|
||||
#define INFRARED_TEXT_STORE_NUM 2
|
||||
#define INFRARED_TEXT_STORE_SIZE 128
|
||||
|
||||
#define INFRARED_MAX_BUTTON_NAME_LENGTH 22
|
||||
#define INFRARED_MAX_REMOTE_NAME_LENGTH 22
|
||||
|
||||
#define INFRARED_APP_FOLDER ANY_PATH("infrared")
|
||||
#define INFRARED_APP_FOLDER ANY_PATH("infrared")
|
||||
#define INFRARED_APP_EXTENSION ".ir"
|
||||
|
||||
#define INFRARED_DEFAULT_REMOTE_NAME "Remote"
|
||||
#define INFRARED_LOG_TAG "InfraredApp"
|
||||
#define INFRARED_LOG_TAG "InfraredApp"
|
||||
|
||||
/**
|
||||
* @brief Enumeration of invalid remote button indices.
|
||||
@@ -86,7 +86,7 @@ typedef struct {
|
||||
bool is_transmitting; /**< Whether a signal is currently being transmitted. */
|
||||
bool is_otg_enabled; /**< Whether OTG power (external 5V) is enabled. */
|
||||
InfraredEditTarget edit_target : 8; /**< Selected editing target (a remote or a button). */
|
||||
InfraredEditMode edit_mode : 8; /**< Selected editing operation (rename or delete). */
|
||||
InfraredEditMode edit_mode : 8; /**< Selected editing operation (rename or delete). */
|
||||
int32_t current_button_index; /**< Selected button index (move destination). */
|
||||
int32_t prev_button_index; /**< Previous button index (move source). */
|
||||
uint32_t last_transmit_time; /**< Lat time a signal was transmitted. */
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
#include "infrared_signal.h"
|
||||
#include "infrared_brute_force.h"
|
||||
|
||||
#define INFRARED_CLI_BUF_SIZE (10U)
|
||||
#define INFRARED_CLI_FILE_NAME_SIZE (256U)
|
||||
#define INFRARED_FILE_EXTENSION ".ir"
|
||||
#define INFRARED_ASSETS_FOLDER EXT_PATH("infrared/assets")
|
||||
#define INFRARED_CLI_BUF_SIZE (10U)
|
||||
#define INFRARED_CLI_FILE_NAME_SIZE (256U)
|
||||
#define INFRARED_FILE_EXTENSION ".ir"
|
||||
#define INFRARED_ASSETS_FOLDER EXT_PATH("infrared/assets")
|
||||
#define INFRARED_BRUTE_FORCE_DUMMY_INDEX 0
|
||||
|
||||
DICT_DEF2(dict_signals, FuriString*, FURI_STRING_OPLIST, int, M_DEFAULT_OPLIST)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#define TAG "InfraredRemote"
|
||||
|
||||
#define INFRARED_FILE_HEADER "IR signals file"
|
||||
#define INFRARED_FILE_HEADER "IR signals file"
|
||||
#define INFRARED_FILE_VERSION (1)
|
||||
|
||||
ARRAY_DEF(StringArray, const char*, M_CSTR_DUP_OPLIST); //-V575
|
||||
|
||||
@@ -13,18 +13,18 @@
|
||||
#define INFRARED_SIGNAL_TYPE_KEY "type"
|
||||
|
||||
// Type key values
|
||||
#define INFRARED_SIGNAL_TYPE_RAW "raw"
|
||||
#define INFRARED_SIGNAL_TYPE_RAW "raw"
|
||||
#define INFRARED_SIGNAL_TYPE_PARSED "parsed"
|
||||
|
||||
// Raw signal keys
|
||||
#define INFRARED_SIGNAL_DATA_KEY "data"
|
||||
#define INFRARED_SIGNAL_FREQUENCY_KEY "frequency"
|
||||
#define INFRARED_SIGNAL_DATA_KEY "data"
|
||||
#define INFRARED_SIGNAL_FREQUENCY_KEY "frequency"
|
||||
#define INFRARED_SIGNAL_DUTY_CYCLE_KEY "duty_cycle"
|
||||
|
||||
// Parsed signal keys
|
||||
#define INFRARED_SIGNAL_PROTOCOL_KEY "protocol"
|
||||
#define INFRARED_SIGNAL_ADDRESS_KEY "address"
|
||||
#define INFRARED_SIGNAL_COMMAND_KEY "command"
|
||||
#define INFRARED_SIGNAL_ADDRESS_KEY "address"
|
||||
#define INFRARED_SIGNAL_COMMAND_KEY "command"
|
||||
|
||||
struct InfraredSignal {
|
||||
bool is_raw;
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
|
||||
#include <toolbox/m_cstr_dup.h>
|
||||
|
||||
#define LIST_ITEMS 4U
|
||||
#define LIST_LINE_H 13U
|
||||
#define HEADER_H 12U
|
||||
#define LIST_ITEMS 4U
|
||||
#define LIST_LINE_H 13U
|
||||
#define HEADER_H 12U
|
||||
#define MOVE_X_OFFSET 5U
|
||||
|
||||
struct InfraredMoveView {
|
||||
@@ -98,7 +98,7 @@ static bool infrared_move_view_input_callback(InputEvent* event, void* context)
|
||||
|
||||
bool consumed = false;
|
||||
|
||||
if(((event->type == InputTypeShort || event->type == InputTypeRepeat)) &&
|
||||
if((event->type == InputTypeShort || event->type == InputTypeRepeat) &&
|
||||
((event->key == InputKeyUp) || (event->key == InputKeyDown))) {
|
||||
with_view_model(
|
||||
move_view->view,
|
||||
|
||||
@@ -23,7 +23,7 @@ static void lfrfid_cli_print_usage(void) {
|
||||
"rfid raw_emulate <filename> - emulate raw data (not very useful, but helps debug protocols)\r\n");
|
||||
printf(
|
||||
"rfid raw_analyze <filename> - outputs raw data to the cli and tries to decode it (useful for protocol development)\r\n");
|
||||
};
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
ProtocolId protocol;
|
||||
|
||||
@@ -37,10 +37,10 @@
|
||||
|
||||
#define LFRFID_TEXT_STORE_SIZE 40
|
||||
|
||||
#define LFRFID_APP_FOLDER ANY_PATH("lfrfid")
|
||||
#define LFRFID_SD_FOLDER EXT_PATH("lfrfid")
|
||||
#define LFRFID_APP_FILENAME_PREFIX "RFID"
|
||||
#define LFRFID_APP_FILENAME_EXTENSION ".rfid"
|
||||
#define LFRFID_APP_FOLDER ANY_PATH("lfrfid")
|
||||
#define LFRFID_SD_FOLDER EXT_PATH("lfrfid")
|
||||
#define LFRFID_APP_FILENAME_PREFIX "RFID"
|
||||
#define LFRFID_APP_FILENAME_EXTENSION ".rfid"
|
||||
#define LFRFID_APP_SHADOW_FILENAME_EXTENSION ".shd"
|
||||
|
||||
#define LFRFID_APP_RAW_ASK_EXTENSION ".ask.raw"
|
||||
|
||||
@@ -56,4 +56,4 @@ void gallagher_deobfuscate_and_parse_credential(
|
||||
((uint32_t)cardholder_data_deobfuscated[2] << 3) +
|
||||
(((uint32_t)cardholder_data_deobfuscated[3] >> 5) & 0x07);
|
||||
credential->issue = cardholder_data_deobfuscated[7] & 0x0F;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,4 +30,4 @@ void gallagher_deobfuscate_and_parse_credential(
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -14,4 +14,4 @@ bool mosgortrans_parse_transport_block(const MfClassicBlock* block, FuriString*
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -18,4 +18,4 @@ void felica_auth_reset(FelicaAuthenticationContext* instance) {
|
||||
instance->skip_auth = true;
|
||||
instance->auth_status.external = 0;
|
||||
instance->auth_status.internal = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <furi/furi.h>
|
||||
#include <storage/storage.h>
|
||||
|
||||
#define NFC_APP_KEYS_EXTENSION ".keys"
|
||||
#define NFC_APP_KEYS_EXTENSION ".keys"
|
||||
#define NFC_APP_KEY_CACHE_FOLDER "/ext/nfc/.cache"
|
||||
|
||||
static const char* mf_classic_key_cache_file_header = "Flipper NFC keys";
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <nfc/protocols/mf_classic/mf_classic.h>
|
||||
#include <furi/furi.h>
|
||||
|
||||
#define NFC_APP_FOLDER ANY_PATH("nfc")
|
||||
#define NFC_APP_FOLDER ANY_PATH("nfc")
|
||||
#define NFC_APP_MF_CLASSIC_DICT_USER_PATH (NFC_APP_FOLDER "/assets/mf_classic_dict_user.nfc")
|
||||
|
||||
struct MfUserDict {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#define TAG "NfcSupportedCards"
|
||||
|
||||
#define NFC_SUPPORTED_CARDS_PLUGINS_PATH APP_DATA_PATH("plugins")
|
||||
#define NFC_SUPPORTED_CARDS_PLUGINS_PATH APP_DATA_PATH("plugins")
|
||||
#define NFC_SUPPORTED_CARDS_PLUGIN_SUFFIX "_parser.fal"
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -19,4 +19,4 @@ void nfc_render_felica_dump(const FelicaData* data, FuriString* str);
|
||||
void nfc_render_felica_idm(
|
||||
const FelicaData* data,
|
||||
NfcProtocolFormatType format_type,
|
||||
FuriString* str);
|
||||
FuriString* str);
|
||||
|
||||
@@ -120,4 +120,4 @@ const NfcProtocolSupportBase nfc_protocol_support_mf_plus = {
|
||||
.on_enter = nfc_scene_emulate_on_enter_mf_plus,
|
||||
.on_event = nfc_protocol_support_common_on_event_empty,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
#include "../nfc_protocol_support_base.h"
|
||||
|
||||
extern const NfcProtocolSupportBase nfc_protocol_support_mf_plus;
|
||||
extern const NfcProtocolSupportBase nfc_protocol_support_mf_plus;
|
||||
|
||||
@@ -11,4 +11,4 @@ void nfc_render_mf_ultralight_info(
|
||||
|
||||
void nfc_render_mf_ultralight_dump(const MfUltralightData* data, FuriString* str);
|
||||
|
||||
void nfc_render_mf_ultralight_pwd_pack(const MfUltralightData* data, FuriString* str);
|
||||
void nfc_render_mf_ultralight_pwd_pack(const MfUltralightData* data, FuriString* str);
|
||||
|
||||
@@ -113,4 +113,4 @@ bool nfc_protocol_support_on_event(
|
||||
*/
|
||||
void nfc_protocol_support_on_exit(NfcProtocolSupportScene scene, void* context);
|
||||
|
||||
bool nfc_protocol_support_has_feature(NfcProtocol protocol, NfcProtocolFeature feature);
|
||||
bool nfc_protocol_support_has_feature(NfcProtocol protocol, NfcProtocolFeature feature);
|
||||
|
||||
@@ -35,4 +35,4 @@ void nfc_unlock_helper_card_detected_handler(NfcApp* instance) {
|
||||
scene_manager_set_scene_state(
|
||||
instance->scene_manager, NfcSceneRead, NfcSceneReadMenuStateCardFound);
|
||||
nfc_scene_read_setup_view(instance);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,4 +6,4 @@ typedef enum {
|
||||
} NfcSceneUnlockReadState;
|
||||
|
||||
void nfc_unlock_helper_setup_from_state(NfcApp* instance);
|
||||
void nfc_unlock_helper_card_detected_handler(NfcApp* instance);
|
||||
void nfc_unlock_helper_card_detected_handler(NfcApp* instance);
|
||||
|
||||
@@ -62,19 +62,19 @@
|
||||
#include <toolbox/name_generator.h>
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
#define NFC_NAME_SIZE 22
|
||||
#define NFC_TEXT_STORE_SIZE 128
|
||||
#define NFC_NAME_SIZE 22
|
||||
#define NFC_TEXT_STORE_SIZE 128
|
||||
#define NFC_BYTE_INPUT_STORE_SIZE 10
|
||||
#define NFC_LOG_SIZE_MAX (1024)
|
||||
#define NFC_APP_FOLDER ANY_PATH("nfc")
|
||||
#define NFC_APP_EXTENSION ".nfc"
|
||||
#define NFC_APP_SHADOW_EXTENSION ".shd"
|
||||
#define NFC_APP_FILENAME_PREFIX "NFC"
|
||||
#define NFC_LOG_SIZE_MAX (1024)
|
||||
#define NFC_APP_FOLDER ANY_PATH("nfc")
|
||||
#define NFC_APP_EXTENSION ".nfc"
|
||||
#define NFC_APP_SHADOW_EXTENSION ".shd"
|
||||
#define NFC_APP_FILENAME_PREFIX "NFC"
|
||||
|
||||
#define NFC_APP_MFKEY32_LOGS_FILE_NAME ".mfkey32.log"
|
||||
#define NFC_APP_MFKEY32_LOGS_FILE_PATH (NFC_APP_FOLDER "/" NFC_APP_MFKEY32_LOGS_FILE_NAME)
|
||||
|
||||
#define NFC_APP_MF_CLASSIC_DICT_USER_PATH (NFC_APP_FOLDER "/assets/mf_classic_dict_user.nfc")
|
||||
#define NFC_APP_MF_CLASSIC_DICT_USER_PATH (NFC_APP_FOLDER "/assets/mf_classic_dict_user.nfc")
|
||||
#define NFC_APP_MF_CLASSIC_DICT_SYSTEM_PATH (NFC_APP_FOLDER "/assets/mf_classic_dict.nfc")
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -84,4 +84,4 @@ static const FlipperAppPluginDescriptor gallagher_plugin_descriptor = {
|
||||
/* Plugin entry point */
|
||||
const FlipperAppPluginDescriptor* gallagher_plugin_ep(void) {
|
||||
return &gallagher_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
#include <bit_lib.h>
|
||||
|
||||
#define TAG "HI!"
|
||||
#define KEY_LENGTH 6
|
||||
|
||||
#define KEY_LENGTH 6
|
||||
#define HI_KEY_TO_GEN 5
|
||||
#define UID_LENGTH 7
|
||||
#define UID_LENGTH 7
|
||||
|
||||
typedef struct {
|
||||
uint64_t a;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <bit_lib.h>
|
||||
|
||||
#define TAG "Microel"
|
||||
|
||||
#define KEY_LENGTH 6
|
||||
#define UID_LENGTH 4
|
||||
|
||||
@@ -228,4 +229,4 @@ static const FlipperAppPluginDescriptor microel_plugin_descriptor = {
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* microel_plugin_ep(void) {
|
||||
return µel_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
#include <bit_lib.h>
|
||||
|
||||
#define TAG "MiZIP"
|
||||
#define KEY_LENGTH 6
|
||||
|
||||
#define KEY_LENGTH 6
|
||||
#define MIZIP_KEY_TO_GEN 5
|
||||
#define UID_LENGTH 4
|
||||
#define UID_LENGTH 4
|
||||
|
||||
typedef struct {
|
||||
uint64_t a;
|
||||
|
||||
@@ -62,18 +62,18 @@ static const char* opal_usages[14] = {
|
||||
|
||||
// Opal file 0x7 structure. Assumes a little-endian CPU.
|
||||
typedef struct FURI_PACKED {
|
||||
uint32_t serial : 32;
|
||||
uint8_t check_digit : 4;
|
||||
bool blocked : 1;
|
||||
uint16_t txn_number : 16;
|
||||
int32_t balance : 21;
|
||||
uint16_t days : 15;
|
||||
uint16_t minutes : 11;
|
||||
uint8_t mode : 3;
|
||||
uint16_t usage : 4;
|
||||
bool auto_topup : 1;
|
||||
uint32_t serial : 32;
|
||||
uint8_t check_digit : 4;
|
||||
bool blocked : 1;
|
||||
uint16_t txn_number : 16;
|
||||
int32_t balance : 21;
|
||||
uint16_t days : 15;
|
||||
uint16_t minutes : 11;
|
||||
uint8_t mode : 3;
|
||||
uint16_t usage : 4;
|
||||
bool auto_topup : 1;
|
||||
uint8_t weekly_journeys : 4;
|
||||
uint16_t checksum : 16;
|
||||
uint16_t checksum : 16;
|
||||
} OpalFile;
|
||||
|
||||
static_assert(sizeof(OpalFile) == 16, "OpalFile");
|
||||
|
||||
@@ -38,7 +38,7 @@ bool parse_datetime(uint16_t date, DateTime* result) {
|
||||
result->year = 2000 + (date >> 9);
|
||||
result->month = date >> 5 & 0x0F;
|
||||
result->day = date & 0x1F;
|
||||
return (date != 0);
|
||||
return date != 0;
|
||||
}
|
||||
|
||||
static bool umarsh_parse(const NfcDevice* device, FuriString* parsed_data) {
|
||||
|
||||
@@ -192,4 +192,4 @@ static const FlipperAppPluginDescriptor washcity_plugin_descriptor = {
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* washcity_plugin_ep(void) {
|
||||
return &washcity_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#define NXP_MANUFACTURER_ID (0x04)
|
||||
|
||||
#define NFC_SCENE_DETECT_READER_PAIR_NONCES_MAX (10U)
|
||||
#define NFC_SCENE_DETECT_READER_PAIR_NONCES_MAX (10U)
|
||||
#define NFC_SCENE_DETECT_READER_WAIT_NONCES_TIMEOUT_MS (1000)
|
||||
|
||||
static const NotificationSequence sequence_detect_reader = {
|
||||
|
||||
@@ -55,4 +55,4 @@ void nfc_scene_mf_classic_update_initial_wrong_card_on_exit(void* context) {
|
||||
NfcApp* instance = context;
|
||||
|
||||
widget_reset(instance->widget);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,4 +54,4 @@ void nfc_scene_mf_classic_write_initial_wrong_card_on_exit(void* context) {
|
||||
NfcApp* instance = context;
|
||||
|
||||
widget_reset(instance->widget);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,4 +55,4 @@ void nfc_scene_mf_ultralight_wrong_card_on_exit(void* context) {
|
||||
NfcApp* instance = context;
|
||||
|
||||
widget_reset(instance->widget);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <lib/subghz/subghz_tx_rx_worker.h>
|
||||
|
||||
#define TAG "SubGhzChat"
|
||||
|
||||
#define SUBGHZ_CHAT_WORKER_TIMEOUT_BETWEEN_MESSAGES 500
|
||||
|
||||
struct SubGhzChatWorker {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <float_tools.h>
|
||||
|
||||
#define TAG "SubGhzThresholdRssi"
|
||||
|
||||
#define THRESHOLD_RSSI_LOW_COUNT 10
|
||||
|
||||
struct SubGhzThresholdRssi {
|
||||
|
||||
@@ -542,22 +542,19 @@ SubGhzProtocolDecoderBase* subghz_txrx_get_decoder(SubGhzTxRx* instance) {
|
||||
|
||||
bool subghz_txrx_protocol_is_serializable(SubGhzTxRx* instance) {
|
||||
furi_assert(instance);
|
||||
return (
|
||||
(instance->decoder_result->protocol->flag & SubGhzProtocolFlag_Save) ==
|
||||
SubGhzProtocolFlag_Save);
|
||||
return (instance->decoder_result->protocol->flag & SubGhzProtocolFlag_Save) ==
|
||||
SubGhzProtocolFlag_Save;
|
||||
}
|
||||
|
||||
bool subghz_txrx_protocol_is_transmittable(SubGhzTxRx* instance, bool check_type) {
|
||||
furi_assert(instance);
|
||||
const SubGhzProtocol* protocol = instance->decoder_result->protocol;
|
||||
if(check_type) {
|
||||
return (
|
||||
((protocol->flag & SubGhzProtocolFlag_Send) == SubGhzProtocolFlag_Send) &&
|
||||
protocol->encoder->deserialize && protocol->type == SubGhzProtocolTypeStatic);
|
||||
return ((protocol->flag & SubGhzProtocolFlag_Send) == SubGhzProtocolFlag_Send) &&
|
||||
protocol->encoder->deserialize && protocol->type == SubGhzProtocolTypeStatic;
|
||||
}
|
||||
return (
|
||||
((protocol->flag & SubGhzProtocolFlag_Send) == SubGhzProtocolFlag_Send) &&
|
||||
protocol->encoder->deserialize);
|
||||
return ((protocol->flag & SubGhzProtocolFlag_Send) == SubGhzProtocolFlag_Send) &&
|
||||
protocol->encoder->deserialize;
|
||||
}
|
||||
|
||||
void subghz_txrx_receiver_set_filter(SubGhzTxRx* instance, SubGhzProtocolFlag filter) {
|
||||
|
||||
@@ -145,4 +145,4 @@ bool subghz_txrx_gen_secplus_v2_protocol(
|
||||
bool subghz_txrx_gen_secplus_v1_protocol(
|
||||
SubGhzTxRx* instance,
|
||||
const char* name_preset,
|
||||
uint32_t frequency);
|
||||
uint32_t frequency);
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
#include <lib/subghz/protocols/raw.h>
|
||||
#include <toolbox/path.h>
|
||||
|
||||
#define RAW_FILE_NAME "RAW_"
|
||||
#define TAG "SubGhzSceneReadRAW"
|
||||
|
||||
#define RAW_FILE_NAME "RAW_"
|
||||
|
||||
bool subghz_scene_read_raw_update_filename(SubGhz* subghz) {
|
||||
bool ret = false;
|
||||
//set the path to read the file
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
|
||||
#include <furi.h>
|
||||
|
||||
#define SUBGHZ_HISTORY_MAX 65535 // uint16_t index max, ram limit below
|
||||
#define SUBGHZ_HISTORY_MAX 65535 // uint16_t index max, ram limit below
|
||||
#define SUBGHZ_HISTORY_FREE_HEAP (10240 * (3 - MIN(rpc_get_sessions_count(instance->rpc), 2U)))
|
||||
|
||||
#define TAG "SubGhzHistory"
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -441,7 +441,7 @@ void subghz_unlock(SubGhz* subghz) {
|
||||
|
||||
bool subghz_is_locked(SubGhz* subghz) {
|
||||
furi_assert(subghz);
|
||||
return (subghz->lock == SubGhzLockOn);
|
||||
return subghz->lock == SubGhzLockOn;
|
||||
}
|
||||
|
||||
void subghz_rx_key_state_set(SubGhz* subghz, SubGhzRxKeyState state) {
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
#include "subghz_read_raw.h"
|
||||
|
||||
#define FRAME_HEIGHT 12
|
||||
#define MAX_LEN_PX 111
|
||||
#define MENU_ITEMS 4u
|
||||
#define UNLOCK_CNT 3
|
||||
#define MAX_LEN_PX 111
|
||||
#define MENU_ITEMS 4u
|
||||
#define UNLOCK_CNT 3
|
||||
|
||||
#define FLIP_TIMEOUT (500)
|
||||
|
||||
@@ -190,7 +190,7 @@ void subghz_view_receiver_add_item_to_menu(
|
||||
item_menu->item_str = furi_string_alloc_set(name);
|
||||
item_menu->type = type;
|
||||
item_menu->repeats = repeats;
|
||||
if((model->idx == model->history_item - 1)) {
|
||||
if(model->idx == model->history_item - 1) {
|
||||
model->history_item++;
|
||||
model->idx++;
|
||||
subghz_view_receiver_show_time_moment(subghz_receiver);
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
|
||||
#define TAG "frequency_analyzer"
|
||||
|
||||
#define RSSI_MIN -97
|
||||
#define RSSI_MAX -60
|
||||
#define RSSI_SCALE 2.3
|
||||
#define RSSI_MIN -97
|
||||
#define RSSI_MAX -60
|
||||
#define RSSI_SCALE 2.3
|
||||
#define TRIGGER_STEP 1
|
||||
#define MAX_HISTORY 4
|
||||
#define MAX_HISTORY 4
|
||||
|
||||
static const uint32_t subghz_frequency_list[] = {
|
||||
300000000, 302757000, 303875000, 303900000, 304250000, 307000000, 307500000, 307800000,
|
||||
|
||||
@@ -6,9 +6,11 @@
|
||||
#include <gui/elements.h>
|
||||
|
||||
#include <assets_icons.h>
|
||||
#define SUBGHZ_READ_RAW_RSSI_HISTORY_SIZE 100
|
||||
|
||||
#define TAG "SubGhzReadRaw"
|
||||
|
||||
#define SUBGHZ_READ_RAW_RSSI_HISTORY_SIZE 100
|
||||
|
||||
struct SubGhzReadRAW {
|
||||
View* view;
|
||||
SubGhzReadRAWCallback callback;
|
||||
|
||||
@@ -12,13 +12,14 @@
|
||||
#include <mbedtls/error.h>
|
||||
|
||||
#define TAG "U2f"
|
||||
|
||||
#define WORKER_TAG TAG "Worker"
|
||||
|
||||
#define MCHECK(expr) furi_check((expr) == 0)
|
||||
|
||||
#define U2F_CMD_REGISTER 0x01
|
||||
#define U2F_CMD_REGISTER 0x01
|
||||
#define U2F_CMD_AUTHENTICATE 0x02
|
||||
#define U2F_CMD_VERSION 0x03
|
||||
#define U2F_CMD_VERSION 0x03
|
||||
|
||||
typedef enum {
|
||||
U2fCheckOnly = 0x07, // "check-only" - only check key handle, don't send auth response
|
||||
@@ -28,14 +29,14 @@ typedef enum {
|
||||
0x08, // "dont-enforce-user-presence-and-sign" - send auth response even if user is missing
|
||||
} U2fAuthMode;
|
||||
|
||||
#define U2F_HASH_SIZE 32
|
||||
#define U2F_NONCE_SIZE 32
|
||||
#define U2F_HASH_SIZE 32
|
||||
#define U2F_NONCE_SIZE 32
|
||||
#define U2F_CHALLENGE_SIZE 32
|
||||
#define U2F_APP_ID_SIZE 32
|
||||
#define U2F_APP_ID_SIZE 32
|
||||
|
||||
#define U2F_EC_KEY_SIZE 32
|
||||
#define U2F_EC_KEY_SIZE 32
|
||||
#define U2F_EC_BIGNUM_SIZE 32
|
||||
#define U2F_EC_POINT_SIZE 65
|
||||
#define U2F_EC_POINT_SIZE 65
|
||||
|
||||
typedef struct {
|
||||
uint8_t format;
|
||||
@@ -315,7 +316,7 @@ static uint16_t u2f_register(U2fData* U2F, uint8_t* buf) {
|
||||
uint8_t signature_len = u2f_der_encode_signature(resp->cert + cert_len, signature);
|
||||
memcpy(resp->cert + cert_len + signature_len, state_no_error, 2);
|
||||
|
||||
return (sizeof(U2fRegisterResp) + cert_len + signature_len + 2);
|
||||
return sizeof(U2fRegisterResp) + cert_len + signature_len + 2;
|
||||
}
|
||||
|
||||
static uint16_t u2f_authenticate(U2fData* U2F, uint8_t* buf) {
|
||||
@@ -410,7 +411,7 @@ static uint16_t u2f_authenticate(U2fData* U2F, uint8_t* buf) {
|
||||
|
||||
if(U2F->callback != NULL) U2F->callback(U2fNotifyAuthSuccess, U2F->context);
|
||||
|
||||
return (sizeof(U2fAuthResp) + signature_len + 2);
|
||||
return sizeof(U2fAuthResp) + signature_len + 2;
|
||||
}
|
||||
|
||||
uint16_t u2f_msg_parse(U2fData* U2F, uint8_t* buf, uint16_t len) {
|
||||
|
||||
@@ -8,21 +8,21 @@
|
||||
#define TAG "U2f"
|
||||
|
||||
#define U2F_DATA_FILE_ENCRYPTION_KEY_SLOT_FACTORY 2
|
||||
#define U2F_DATA_FILE_ENCRYPTION_KEY_SLOT_UNIQUE FURI_HAL_CRYPTO_ENCLAVE_UNIQUE_KEY_SLOT
|
||||
#define U2F_DATA_FILE_ENCRYPTION_KEY_SLOT_UNIQUE FURI_HAL_CRYPTO_ENCLAVE_UNIQUE_KEY_SLOT
|
||||
|
||||
#define U2F_CERT_STOCK 0 // Stock certificate, private key is encrypted with factory key
|
||||
#define U2F_CERT_USER 1 // User certificate, private key is encrypted with unique key
|
||||
#define U2F_CERT_USER 1 // User certificate, private key is encrypted with unique key
|
||||
#define U2F_CERT_USER_UNENCRYPTED \
|
||||
2 // Unencrypted user certificate, will be encrypted after first load
|
||||
|
||||
#define U2F_CERT_KEY_FILE_TYPE "Flipper U2F Certificate Key File"
|
||||
#define U2F_CERT_KEY_VERSION 1
|
||||
#define U2F_CERT_KEY_VERSION 1
|
||||
|
||||
#define U2F_DEVICE_KEY_FILE_TYPE "Flipper U2F Device Key File"
|
||||
#define U2F_DEVICE_KEY_VERSION 1
|
||||
#define U2F_DEVICE_KEY_VERSION 1
|
||||
|
||||
#define U2F_COUNTER_FILE_TYPE "Flipper U2F Counter File"
|
||||
#define U2F_COUNTER_VERSION 2
|
||||
#define U2F_COUNTER_FILE_TYPE "Flipper U2F Counter File"
|
||||
#define U2F_COUNTER_VERSION 2
|
||||
#define U2F_COUNTER_VERSION_OLD 1
|
||||
|
||||
#define U2F_COUNTER_CONTROL_VAL 0xAA5500FF
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user