formatting

This commit is contained in:
MX 2024-07-15 20:02:45 +03:00
parent deeb9dcb15
commit 726cb770d0
No known key found for this signature in database
GPG key ID: 7CCC66B7DBDD1C83
488 changed files with 3301 additions and 3288 deletions

View file

@ -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 {
@ -17,7 +17,7 @@ static void draw_stat(Canvas* canvas, int x, int y, const Icon* icon, char* val)
canvas_draw_box(canvas, x - 4, y + 16, 24, 6);
canvas_set_color(canvas, ColorBlack);
canvas_draw_str_aligned(canvas, x + 8, y + 22, AlignCenter, AlignBottom, val);
};
}
static void draw_battery(Canvas* canvas, BatteryInfoModel* data, int x, int y) {
char emote[20] = {};
@ -85,7 +85,7 @@ static void draw_battery(Canvas* canvas, BatteryInfoModel* data, int x, int y) {
canvas_draw_str_aligned(canvas, 92, y + 3, AlignCenter, AlignCenter, emote);
canvas_draw_str_aligned(canvas, 92, y + 15, AlignCenter, AlignCenter, header);
canvas_draw_str_aligned(canvas, 92, y + 27, AlignCenter, AlignCenter, value);
};
}
static void battery_info_draw_callback(Canvas* canvas, void* context) {
furi_assert(context);

View file

@ -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);

View file

@ -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);

View file

@ -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;
}
}

View file

@ -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);

View file

@ -81,4 +81,4 @@ void iso7816_write_response_apdu(
responseDataBufferIndex++;
*readerToPcDataBlockLen = responseDataBufferIndex;
}
}

View file

@ -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 {

View file

@ -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))

View file

@ -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);

View file

@ -78,4 +78,4 @@ int32_t lfrfid_debug_app(void* p) {
lfrfid_debug_free(app);
return 0;
}
}

View file

@ -4,7 +4,7 @@
#include <cli/cli.h>
#include <toolbox/args.h>
#define TAG "SpeakerDebug"
#define TAG "SpeakerDebug"
#define CLI_COMMAND "speaker_debug"
typedef enum {

View file

@ -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,

View file

@ -241,4 +241,4 @@ uint8_t subghz_protocol_blocks_xor_bytes(uint8_t const message[], size_t size) {
result ^= message[i];
}
return result;
}
}

View file

@ -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" {

View file

@ -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"

View file

@ -9,9 +9,9 @@
#include <notification/notification.h>
#include <notification/notification_messages.h>
#define LINES_ON_SCREEN 6
#define LINES_ON_SCREEN 6
#define COLUMNS_ON_SCREEN 21
#define TAG "UartEcho"
#define TAG "UartEcho"
#define DEFAULT_BAUD_RATE 230400
typedef struct UartDumpModel UartDumpModel;

View file

@ -72,7 +72,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) {

View file

@ -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);

View file

@ -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;

View file

@ -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) {

View file

@ -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) {

View file

@ -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;

View file

@ -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) {

View file

@ -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"

View file

@ -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] = {

View file

@ -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 { \

View file

@ -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)

View file

@ -42,15 +42,15 @@ typedef struct {
static RpcSessionContext rpc_session[TEST_RPC_SESSIONS];
#define TAG "UnitTestsRpc"
#define TAG "UnitTestsRpc"
#define MAX_RECEIVE_OUTPUT_TIMEOUT 3000
#define MAX_NAME_LENGTH 255
#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 MAX_NAME_LENGTH 255
#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_REQUEST 0
#define PING_RESPONSE 1
#define WRITE_REQUEST 0
#define READ_RESPONSE 1
@ -971,7 +971,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 +1212,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);

View file

@ -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")

View file

@ -10,14 +10,14 @@
#include <lib/subghz/devices/devices.h>
#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 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 TEST_RANDOM_COUNT_PARSE 329
#define TEST_TIMEOUT 10000
#define TEST_TIMEOUT 10000
static SubGhzEnvironment* environment_handler;
static SubGhzReceiver* receiver_handler;

View file

@ -2,7 +2,7 @@
#include <flipper_application/flipper_application.h>
#define APPID "UnitTest"
#define APPID "UnitTest"
#define API_VERSION (0u)
typedef struct {

View file

@ -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,

View file

@ -17,18 +17,18 @@
#define TAG "SubGhzDeviceCc1101Ext"
#define SUBGHZ_DEVICE_CC1101_EXT_TX_GPIO (&gpio_ext_pb2)
#define SUBGHZ_DEVICE_CC1101_EXT_E07_AMP_GPIO &gpio_ext_pc3
#define SUBGHZ_DEVICE_CC1101_EXT_TX_GPIO (&gpio_ext_pb2)
#define SUBGHZ_DEVICE_CC1101_EXT_E07_AMP_GPIO &gpio_ext_pc3
#define SUBGHZ_DEVICE_CC1101_EXT_FORCE_DANGEROUS_RANGE false
#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 \

View file

@ -107,4 +107,4 @@ static const FlipperAppPluginDescriptor subghz_device_cc1101_ext_descriptor = {
const FlipperAppPluginDescriptor* subghz_device_cc1101_ext_ep(void) {
return &subghz_device_cc1101_ext_descriptor;
}
}

View file

@ -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 {

View file

@ -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;

View file

@ -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))));

View file

@ -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 {

View file

@ -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

View file

@ -43,4 +43,4 @@ struct ArchiveApp {
char file_extension[MAX_EXT_LEN + 1];
};
void archive_show_loading_popup(ArchiveApp* context, bool show);
void archive_show_loading_popup(ArchiveApp* context, bool show);

View file

@ -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[] = {

View file

@ -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* context);

View file

@ -47,4 +47,4 @@ static void
obj->text = furi_string_alloc_set(text);
obj->event = event;
}
#pragma GCC diagnostic pop
#pragma GCC diagnostic pop

View file

@ -8,7 +8,7 @@
#define TAG "ArchiveSceneBrowser"
#define SCENE_STATE_DEFAULT (0)
#define SCENE_STATE_DEFAULT (0)
#define SCENE_STATE_NEED_REFRESH (1)
static const char* archive_get_flipper_app_name(ArchiveFileTypeEnum file_type) {

View file

@ -3,4 +3,4 @@ ADD_SCENE(archive, rename, Rename)
ADD_SCENE(archive, delete, Delete)
ADD_SCENE(archive, info, Info)
ADD_SCENE(archive, show, Show)
ADD_SCENE(archive, new_dir, NewDir)
ADD_SCENE(archive, new_dir, NewDir)

View file

@ -3,7 +3,7 @@
#include "../helpers/archive_browser.h"
#define SCENE_DELETE_CUSTOM_EVENT (0UL)
#define MAX_TEXT_INPUT_LEN 22
#define MAX_TEXT_INPUT_LEN 22
void archive_scene_delete_widget_callback(GuiButtonType result, InputType type, void* context) {
furi_assert(context);

View file

@ -9,7 +9,7 @@
#define TAG "Archive"
#define SCENE_RENAME_CUSTOM_EVENT (0UL)
#define MAX_TEXT_INPUT_LEN 22
#define MAX_TEXT_INPUT_LEN 22
void archive_scene_rename_text_input_callback(void* context) {
ArchiveApp* archive = (ArchiveApp*)context;

View file

@ -4,9 +4,9 @@
#include "archive_browser_view.h"
#include "../helpers/archive_browser.h"
#define TAG "Archive"
#define TAG "Archive"
#define SCROLL_INTERVAL (333)
#define SCROLL_DELAY (2)
#define SCROLL_DELAY (2)
static const char* ArchiveTabNames[] = {
[ArchiveTabFavorites] = "Favorites",
@ -753,4 +753,4 @@ void archive_browser_clipboard_reset(ArchiveBrowserView* browser) {
ArchiveBrowserViewModel * model,
{ model->clipboard_mode = CLIPBOARD_MODE_OFF; },
true);
}
}

View file

@ -14,15 +14,15 @@
#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 255
#define MAX_EXT_LEN 6
#define MAX_EXT_LEN 6
#define FRAME_HEIGHT 12
#define MENU_ITEMS 5u
#define MOVE_OFFSET 5u
#define MENU_ITEMS 5u
#define MOVE_OFFSET 5u
#define CLIPBOARD_MODE_OFF (0U)
#define CLIPBOARD_MODE_CUT (1U)
#define CLIPBOARD_MODE_OFF (0U)
#define CLIPBOARD_MODE_CUT (1U)
#define CLIPBOARD_MODE_COPY (2U)
typedef enum {

View file

@ -5,9 +5,9 @@
#include <lib/toolbox/path.h>
#include <flipper_format/flipper_format.h>
#define BAD_USB_SETTINGS_PATH BAD_USB_APP_BASE_FOLDER "/.badusb.settings"
#define BAD_USB_SETTINGS_FILE_TYPE "Flipper BadUSB Settings File"
#define BAD_USB_SETTINGS_VERSION 1
#define BAD_USB_SETTINGS_PATH BAD_USB_APP_BASE_FOLDER "/.badusb.settings"
#define BAD_USB_SETTINGS_FILE_TYPE "Flipper BadUSB Settings File"
#define BAD_USB_SETTINGS_VERSION 1
#define BAD_USB_SETTINGS_DEFAULT_LAYOUT BAD_USB_APP_PATH_LAYOUT_FOLDER "/en-US.kl"
static bool bad_usb_app_custom_event_callback(void* context, uint32_t event) {

View file

@ -16,10 +16,10 @@
#include "views/bad_usb_view.h"
#include <furi_hal_usb.h>
#define BAD_USB_APP_BASE_FOLDER EXT_PATH("badusb")
#define BAD_USB_APP_BASE_FOLDER EXT_PATH("badusb")
#define BAD_USB_APP_PATH_LAYOUT_FOLDER BAD_USB_APP_BASE_FOLDER "/assets/layouts"
#define BAD_USB_APP_SCRIPT_EXTENSION ".txt"
#define BAD_USB_APP_LAYOUT_EXTENSION ".kl"
#define BAD_USB_APP_SCRIPT_EXTENSION ".txt"
#define BAD_USB_APP_LAYOUT_EXTENSION ".kl"
typedef enum {
BadUsbAppErrorNoFiles,
@ -49,4 +49,4 @@ typedef enum {
BadUsbAppViewError,
BadUsbAppViewWork,
BadUsbAppViewConfig,
} BadUsbAppView;
} BadUsbAppView;

View file

@ -223,4 +223,4 @@ void bad_usb_hid_ble_remove_pairing(void) {
furi_check(bt_profile_restore_default(bt));
furi_record_close(RECORD_BT);
}
}

View file

@ -8,7 +8,7 @@
#include "ducky_script_i.h"
#include <dolphin/dolphin.h>
#define TAG "BadUsb"
#define TAG "BadUsb"
#define WORKER_TAG TAG "Worker"
#define BADUSB_ASCII_TO_KEY(script, x) \

View file

@ -215,7 +215,7 @@ static const DuckyCmd ducky_commands[] = {
{"GLOBE", ducky_fnc_globe, -1},
};
#define TAG "BadUsb"
#define TAG "BadUsb"
#define WORKER_TAG TAG "Worker"
int32_t ducky_execute_cmd(BadUsbScript* bad_usb, const char* line) {

View file

@ -9,10 +9,10 @@ extern "C" {
#include "ducky_script.h"
#include "bad_usb_hid.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)

View file

@ -7,14 +7,14 @@
#define CLOCK_ISO_DATE_FORMAT "%.4d-%.2d-%.2d"
#define CLOCK_RFC_DATE_FORMAT "%.2d-%.2d-%.4d"
#define CLOCK_TIME_FORMAT "%.2d:%.2d:%.2d"
#define CLOCK_TIME_FORMAT "%.2d:%.2d:%.2d"
#define MERIDIAN_FORMAT "%s"
#define MERIDIAN_FORMAT "%s"
#define MERIDIAN_STRING_AM "AM"
#define MERIDIAN_STRING_PM "PM"
#define TIME_LEN 12
#define DATE_LEN 14
#define TIME_LEN 12
#define DATE_LEN 14
#define MERIDIAN_LEN 3
typedef enum {

View file

@ -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] = {

View file

@ -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 22

View file

@ -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] = {

View file

@ -17,9 +17,9 @@ typedef struct InfraredApp InfraredApp;
#include <storage/storage.h>
#include <furi_hal_infrared.h>
#define INFRARED_SETTINGS_PATH EXT_PATH("infrared/.infrared.settings")
#define INFRARED_SETTINGS_PATH EXT_PATH("infrared/.infrared.settings")
#define INFRARED_SETTINGS_VERSION (1)
#define INFRARED_SETTINGS_MAGIC (0x1F)
#define INFRARED_SETTINGS_MAGIC (0x1F)
typedef struct {
FuriHalInfraredTxPin tx_pin;

View file

@ -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. */

View file

@ -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)

View file

@ -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

View file

@ -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;

View file

@ -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 {

View file

@ -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;

View file

@ -35,13 +35,13 @@
#include <lfrfid/scenes/lfrfid_scene.h>
#define LFRFID_KEY_NAME_SIZE 22
#define LFRFID_KEY_NAME_SIZE 22
#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"
@ -155,4 +155,4 @@ void lfrfid_widget_callback(GuiButtonType result, InputType type, void* context)
void lfrfid_text_input_callback(void* context);
const uint32_t* lfrfid_get_t5577_default_passwords(uint8_t* len);
const uint32_t* lfrfid_get_t5577_default_passwords(uint8_t* len);

View file

@ -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;
}
}

View file

@ -30,4 +30,4 @@ void gallagher_deobfuscate_and_parse_credential(
#ifdef __cplusplus
}
#endif
#endif

View file

@ -14,4 +14,4 @@ bool mosgortrans_parse_transport_block(const MfClassicBlock* block, FuriString*
#ifdef __cplusplus
}
#endif
#endif

View file

@ -18,4 +18,4 @@ void felica_auth_reset(FelicaAuthenticationContext* instance) {
instance->skip_auth = true;
instance->auth_status.external = 0;
instance->auth_status.internal = 0;
}
}

View file

@ -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";

View file

@ -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 {

View file

@ -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 {

View file

@ -27,4 +27,4 @@ void nfc_render_emv_transactions(const EmvApplication* data, FuriString* str);
void nfc_render_emv_uid(const uint8_t* uid, const uint8_t uid_len, FuriString* str);
void nfc_render_emv_header(FuriString* str);
void nfc_render_emv_header(FuriString* str);

View file

@ -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);

View file

@ -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,
},
};
};

View file

@ -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;

View file

@ -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);

View file

@ -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);

View file

@ -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);
}
}

View file

@ -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);

View file

@ -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 {

View file

@ -9,11 +9,11 @@
#define TAG "Bip"
#define BIP_CARD_ID_SECTOR_NUMBER (0)
#define BIP_BALANCE_SECTOR_NUMBER (8)
#define BIP_CARD_ID_SECTOR_NUMBER (0)
#define BIP_BALANCE_SECTOR_NUMBER (8)
#define BIP_TRIP_TIME_WINDOW_SECTOR_NUMBER (5)
#define BIP_LAST_TOP_UPS_SECTOR_NUMBER (10)
#define BIP_TRIPS_INFO_SECTOR_NUMBER (11)
#define BIP_LAST_TOP_UPS_SECTOR_NUMBER (10)
#define BIP_TRIPS_INFO_SECTOR_NUMBER (11)
typedef struct {
DateTime datetime;

View file

@ -92,10 +92,10 @@
0, 0, 0, 1, 1, 2003, 4 \
}
// timestep is one minute
#define CHARLIE_TIME_DELTA_SECS 60
#define CHARLIE_END_VALID_DELTA_SECS 60 * 8
#define CHARLIE_TIME_DELTA_SECS 60
#define CHARLIE_END_VALID_DELTA_SECS 60 * 8
#define CHARLIE_N_TRANSACTION_HISTORY 10
#define CHARLIE_N_PASSES 4
#define CHARLIE_N_PASSES 4
typedef struct {
uint64_t a;

View file

@ -201,4 +201,4 @@ static const FlipperAppPluginDescriptor emv_plugin_descriptor = {
/* Plugin entry point - must return a pointer to const descriptor */
const FlipperAppPluginDescriptor* emv_plugin_ep() {
return &emv_plugin_descriptor;
}
}

View file

@ -84,4 +84,4 @@ static const FlipperAppPluginDescriptor gallagher_plugin_descriptor = {
/* Plugin entry point */
const FlipperAppPluginDescriptor* gallagher_plugin_ep(void) {
return &gallagher_plugin_descriptor;
}
}

View file

@ -5,10 +5,10 @@
#include <bit_lib.h>
#define TAG "HI!"
#define KEY_LENGTH 6
#define TAG "HI!"
#define KEY_LENGTH 6
#define HI_KEY_TO_GEN 5
#define UID_LENGTH 7
#define UID_LENGTH 7
typedef struct {
uint64_t a;

View file

@ -411,4 +411,4 @@ static const FlipperAppPluginDescriptor kazan_plugin_descriptor = {
/* Plugin entry point - must return a pointer to const descriptor */
const FlipperAppPluginDescriptor* kazan_plugin_ep() {
return &kazan_plugin_descriptor;
}
}

View file

@ -187,4 +187,4 @@ static const FlipperAppPluginDescriptor metromoney_plugin_descriptor = {
/* Plugin entry point - must return a pointer to const descriptor */
const FlipperAppPluginDescriptor* metromoney_plugin_ep() {
return &metromoney_plugin_descriptor;
}
}

View file

@ -5,7 +5,7 @@
#include <bit_lib.h>
#define TAG "Microel"
#define TAG "Microel"
#define KEY_LENGTH 6
#define UID_LENGTH 4
@ -228,4 +228,4 @@ static const FlipperAppPluginDescriptor microel_plugin_descriptor = {
/* Plugin entry point - must return a pointer to const descriptor */
const FlipperAppPluginDescriptor* microel_plugin_ep(void) {
return &microel_plugin_descriptor;
}
}

View file

@ -5,10 +5,10 @@
#include <bit_lib.h>
#define TAG "MiZIP"
#define KEY_LENGTH 6
#define TAG "MiZIP"
#define KEY_LENGTH 6
#define MIZIP_KEY_TO_GEN 5
#define UID_LENGTH 4
#define UID_LENGTH 4
typedef struct {
uint64_t a;

View file

@ -154,4 +154,4 @@ static const FlipperAppPluginDescriptor mykey_plugin_descriptor = {
/* Plugin entry point - must return a pointer to const descriptor */
const FlipperAppPluginDescriptor* mykey_plugin_ep(void) {
return &mykey_plugin_descriptor;
}
}

View file

@ -148,16 +148,16 @@ static void parse_ndef_vcard(FuriString* str, const uint8_t* payload, uint32_t p
static void parse_ndef_wifi(FuriString* str, const uint8_t* payload, uint32_t payload_len) {
// https://android.googlesource.com/platform/packages/apps/Nfc/+/refs/heads/main/src/com/android/nfc/NfcWifiProtectedSetup.java
#define CREDENTIAL_FIELD_ID (0x100E)
#define SSID_FIELD_ID (0x1045)
#define NETWORK_KEY_FIELD_ID (0x1027)
#define AUTH_TYPE_FIELD_ID (0x1003)
#define AUTH_TYPE_EXPECTED_SIZE (2)
#define AUTH_TYPE_OPEN (0x0001)
#define AUTH_TYPE_WPA_PSK (0x0002)
#define AUTH_TYPE_WPA_EAP (0x0008)
#define AUTH_TYPE_WPA2_EAP (0x0010)
#define AUTH_TYPE_WPA2_PSK (0x0020)
#define CREDENTIAL_FIELD_ID (0x100E)
#define SSID_FIELD_ID (0x1045)
#define NETWORK_KEY_FIELD_ID (0x1027)
#define AUTH_TYPE_FIELD_ID (0x1003)
#define AUTH_TYPE_EXPECTED_SIZE (2)
#define AUTH_TYPE_OPEN (0x0001)
#define AUTH_TYPE_WPA_PSK (0x0002)
#define AUTH_TYPE_WPA_EAP (0x0008)
#define AUTH_TYPE_WPA2_EAP (0x0010)
#define AUTH_TYPE_WPA2_PSK (0x0020)
#define AUTH_TYPE_WPA_AND_WPA2_PSK (0x0022)
#define MAX_NETWORK_KEY_SIZE_BYTES (64)

View file

@ -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");

View file

@ -9,11 +9,11 @@
#include <bit_lib.h>
#define TAG "Saflok"
#define TAG "Saflok"
#define MAGIC_TABLE_SIZE 192
#define KEY_LENGTH 6
#define UID_LENGTH 4
#define CHECK_SECTOR 1
#define KEY_LENGTH 6
#define UID_LENGTH 4
#define CHECK_SECTOR 1
typedef struct {
uint64_t a;

View file

@ -260,4 +260,4 @@ static const FlipperAppPluginDescriptor troika_plugin_descriptor = {
/* Plugin entry point - must return a pointer to const descriptor */
const FlipperAppPluginDescriptor* troika_plugin_ep(void) {
return &troika_plugin_descriptor;
}
}

View file

@ -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;
}
}

View file

@ -29,9 +29,9 @@
#define TAG "Zolotaya Korona"
#define TRIP_SECTOR_NUM (4)
#define TRIP_SECTOR_NUM (4)
#define PURSE_SECTOR_NUM (6)
#define INFO_SECTOR_NUM (15)
#define INFO_SECTOR_NUM (15)
// Sector 15 data. Byte [11] contains the mistake. If byte [11] was 0xEF, bytes [1-18] means "ЗАО Золотая Корона"
static const uint8_t info_sector_signature[] = {0xE2, 0x87, 0x80, 0x8E, 0x20, 0x87, 0xAE,
@ -211,4 +211,4 @@ static const FlipperAppPluginDescriptor zolotaya_korona_plugin_descriptor = {
/* Plugin entry point - must return a pointer to const descriptor */
const FlipperAppPluginDescriptor* zolotaya_korona_plugin_ep() {
return &zolotaya_korona_plugin_descriptor;
}
}

View file

@ -141,4 +141,4 @@ static const FlipperAppPluginDescriptor zolotaya_korona_online_plugin_descriptor
/* Plugin entry point - must return a pointer to const descriptor */
const FlipperAppPluginDescriptor* zolotaya_korona_online_plugin_ep() {
return &zolotaya_korona_online_plugin_descriptor;
}
}

Some files were not shown because too many files have changed in this diff Show more