mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-14 00:37:21 +00:00
[FL-3863] toolchain: v37 (#3746)
* toolchain: v36 * toolchain: fixed cert path; lib: nanopb: updated to 0.4.8 * fbtenv: rolled back cert path for 3.11 * clang-format: updated config for v18 * linter fixes * clang-format: properly regenerated config (`clang-format -style=file:.clang-format -dump-config > .clang-format-new; mv .clang-format-new .clang-format`) * clang-format: AllowShortLoopsOnASingleLine: false * toolchain: v37 * fbt: compilation_db.py: fixes for Windows
This commit is contained in:
parent
8c380ebe94
commit
7879876ba1
43 changed files with 170 additions and 117 deletions
126
.clang-format
126
.clang-format
|
@ -3,22 +3,55 @@ Language: Cpp
|
||||||
AccessModifierOffset: -4
|
AccessModifierOffset: -4
|
||||||
AlignAfterOpenBracket: AlwaysBreak
|
AlignAfterOpenBracket: AlwaysBreak
|
||||||
AlignArrayOfStructures: None
|
AlignArrayOfStructures: None
|
||||||
AlignConsecutiveMacros: None
|
AlignConsecutiveAssignments:
|
||||||
AlignConsecutiveAssignments: None
|
Enabled: false
|
||||||
AlignConsecutiveBitFields: None
|
AcrossEmptyLines: false
|
||||||
AlignConsecutiveDeclarations: None
|
AcrossComments: false
|
||||||
|
AlignCompound: false
|
||||||
|
AlignFunctionPointers: false
|
||||||
|
PadOperators: true
|
||||||
|
AlignConsecutiveBitFields:
|
||||||
|
Enabled: false
|
||||||
|
AcrossEmptyLines: false
|
||||||
|
AcrossComments: false
|
||||||
|
AlignCompound: false
|
||||||
|
AlignFunctionPointers: false
|
||||||
|
PadOperators: true
|
||||||
|
AlignConsecutiveDeclarations:
|
||||||
|
Enabled: false
|
||||||
|
AcrossEmptyLines: false
|
||||||
|
AcrossComments: false
|
||||||
|
AlignCompound: false
|
||||||
|
AlignFunctionPointers: false
|
||||||
|
PadOperators: true
|
||||||
|
AlignConsecutiveMacros:
|
||||||
|
Enabled: false
|
||||||
|
AcrossEmptyLines: false
|
||||||
|
AcrossComments: false
|
||||||
|
AlignCompound: false
|
||||||
|
AlignFunctionPointers: false
|
||||||
|
PadOperators: true
|
||||||
|
AlignConsecutiveShortCaseStatements:
|
||||||
|
Enabled: false
|
||||||
|
AcrossEmptyLines: false
|
||||||
|
AcrossComments: false
|
||||||
|
AlignCaseColons: false
|
||||||
AlignEscapedNewlines: Left
|
AlignEscapedNewlines: Left
|
||||||
AlignOperands: Align
|
AlignOperands: Align
|
||||||
AlignTrailingComments: false
|
AlignTrailingComments:
|
||||||
|
Kind: Never
|
||||||
|
OverEmptyLines: 0
|
||||||
AllowAllArgumentsOnNextLine: true
|
AllowAllArgumentsOnNextLine: true
|
||||||
AllowAllParametersOfDeclarationOnNextLine: false
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
AllowShortEnumsOnASingleLine: true
|
AllowBreakBeforeNoexceptSpecifier: Never
|
||||||
AllowShortBlocksOnASingleLine: Never
|
AllowShortBlocksOnASingleLine: Never
|
||||||
AllowShortCaseLabelsOnASingleLine: false
|
AllowShortCaseLabelsOnASingleLine: false
|
||||||
|
AllowShortCompoundRequirementOnASingleLine: true
|
||||||
|
AllowShortEnumsOnASingleLine: true
|
||||||
AllowShortFunctionsOnASingleLine: None
|
AllowShortFunctionsOnASingleLine: None
|
||||||
AllowShortLambdasOnASingleLine: All
|
|
||||||
AllowShortIfStatementsOnASingleLine: WithoutElse
|
AllowShortIfStatementsOnASingleLine: WithoutElse
|
||||||
AllowShortLoopsOnASingleLine: true
|
AllowShortLambdasOnASingleLine: All
|
||||||
|
AllowShortLoopsOnASingleLine: false
|
||||||
AlwaysBreakAfterDefinitionReturnType: None
|
AlwaysBreakAfterDefinitionReturnType: None
|
||||||
AlwaysBreakAfterReturnType: None
|
AlwaysBreakAfterReturnType: None
|
||||||
AlwaysBreakBeforeMultilineStrings: false
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
|
@ -27,17 +60,18 @@ AttributeMacros:
|
||||||
- __capability
|
- __capability
|
||||||
BinPackArguments: false
|
BinPackArguments: false
|
||||||
BinPackParameters: false
|
BinPackParameters: false
|
||||||
|
BitFieldColonSpacing: Both
|
||||||
BraceWrapping:
|
BraceWrapping:
|
||||||
AfterCaseLabel: false
|
AfterCaseLabel: false
|
||||||
AfterClass: false
|
AfterClass: false
|
||||||
AfterControlStatement: Never
|
AfterControlStatement: Never
|
||||||
AfterEnum: false
|
AfterEnum: false
|
||||||
|
AfterExternBlock: false
|
||||||
AfterFunction: false
|
AfterFunction: false
|
||||||
AfterNamespace: false
|
AfterNamespace: false
|
||||||
AfterObjCDeclaration: false
|
AfterObjCDeclaration: false
|
||||||
AfterStruct: false
|
AfterStruct: false
|
||||||
AfterUnion: false
|
AfterUnion: false
|
||||||
AfterExternBlock: false
|
|
||||||
BeforeCatch: false
|
BeforeCatch: false
|
||||||
BeforeElse: false
|
BeforeElse: false
|
||||||
BeforeLambdaBody: false
|
BeforeLambdaBody: false
|
||||||
|
@ -46,33 +80,29 @@ BraceWrapping:
|
||||||
SplitEmptyFunction: true
|
SplitEmptyFunction: true
|
||||||
SplitEmptyRecord: true
|
SplitEmptyRecord: true
|
||||||
SplitEmptyNamespace: true
|
SplitEmptyNamespace: true
|
||||||
BreakBeforeBinaryOperators: None
|
BreakAdjacentStringLiterals: true
|
||||||
BreakBeforeConceptDeclarations: true
|
BreakAfterAttributes: Leave
|
||||||
BreakBeforeBraces: Attach
|
|
||||||
BreakBeforeInheritanceComma: false
|
|
||||||
BreakInheritanceList: BeforeColon
|
|
||||||
BreakBeforeTernaryOperators: false
|
|
||||||
BreakConstructorInitializersBeforeComma: false
|
|
||||||
BreakConstructorInitializers: BeforeComma
|
|
||||||
BreakAfterJavaFieldAnnotations: false
|
BreakAfterJavaFieldAnnotations: false
|
||||||
|
BreakArrays: true
|
||||||
|
BreakBeforeBinaryOperators: None
|
||||||
|
BreakBeforeConceptDeclarations: Always
|
||||||
|
BreakBeforeBraces: Attach
|
||||||
|
BreakBeforeInlineASMColon: OnlyMultiline
|
||||||
|
BreakBeforeTernaryOperators: false
|
||||||
|
BreakConstructorInitializers: BeforeComma
|
||||||
|
BreakInheritanceList: BeforeColon
|
||||||
BreakStringLiterals: false
|
BreakStringLiterals: false
|
||||||
ColumnLimit: 99
|
ColumnLimit: 99
|
||||||
CommentPragmas: '^ IWYU pragma:'
|
CommentPragmas: '^ IWYU pragma:'
|
||||||
QualifierAlignment: Leave
|
|
||||||
CompactNamespaces: false
|
CompactNamespaces: false
|
||||||
ConstructorInitializerIndentWidth: 4
|
ConstructorInitializerIndentWidth: 4
|
||||||
ContinuationIndentWidth: 4
|
ContinuationIndentWidth: 4
|
||||||
Cpp11BracedListStyle: true
|
Cpp11BracedListStyle: true
|
||||||
DeriveLineEnding: true
|
|
||||||
DerivePointerAlignment: false
|
DerivePointerAlignment: false
|
||||||
DisableFormat: false
|
DisableFormat: false
|
||||||
EmptyLineAfterAccessModifier: Never
|
EmptyLineAfterAccessModifier: Never
|
||||||
EmptyLineBeforeAccessModifier: LogicalBlock
|
EmptyLineBeforeAccessModifier: LogicalBlock
|
||||||
ExperimentalAutoDetectBinPacking: false
|
ExperimentalAutoDetectBinPacking: false
|
||||||
PackConstructorInitializers: BinPack
|
|
||||||
BasedOnStyle: ''
|
|
||||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
|
||||||
AllowAllConstructorInitializersOnNextLine: true
|
|
||||||
FixNamespaceComments: false
|
FixNamespaceComments: false
|
||||||
ForEachMacros:
|
ForEachMacros:
|
||||||
- foreach
|
- foreach
|
||||||
|
@ -97,19 +127,30 @@ IncludeCategories:
|
||||||
IncludeIsMainRegex: '(Test)?$'
|
IncludeIsMainRegex: '(Test)?$'
|
||||||
IncludeIsMainSourceRegex: ''
|
IncludeIsMainSourceRegex: ''
|
||||||
IndentAccessModifiers: false
|
IndentAccessModifiers: false
|
||||||
IndentCaseLabels: false
|
|
||||||
IndentCaseBlocks: false
|
IndentCaseBlocks: false
|
||||||
|
IndentCaseLabels: false
|
||||||
|
IndentExternBlock: AfterExternBlock
|
||||||
IndentGotoLabels: true
|
IndentGotoLabels: true
|
||||||
IndentPPDirectives: None
|
IndentPPDirectives: None
|
||||||
IndentExternBlock: AfterExternBlock
|
IndentRequiresClause: false
|
||||||
IndentRequires: false
|
|
||||||
IndentWidth: 4
|
IndentWidth: 4
|
||||||
IndentWrappedFunctionNames: true
|
IndentWrappedFunctionNames: true
|
||||||
|
InsertBraces: false
|
||||||
|
InsertNewlineAtEOF: false
|
||||||
InsertTrailingCommas: None
|
InsertTrailingCommas: None
|
||||||
|
IntegerLiteralSeparator:
|
||||||
|
Binary: 0
|
||||||
|
BinaryMinDigits: 0
|
||||||
|
Decimal: 0
|
||||||
|
DecimalMinDigits: 0
|
||||||
|
Hex: 0
|
||||||
|
HexMinDigits: 0
|
||||||
JavaScriptQuotes: Leave
|
JavaScriptQuotes: Leave
|
||||||
JavaScriptWrapImports: true
|
JavaScriptWrapImports: true
|
||||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||||
|
KeepEmptyLinesAtEOF: false
|
||||||
LambdaBodyIndentation: Signature
|
LambdaBodyIndentation: Signature
|
||||||
|
LineEnding: DeriveLF
|
||||||
MacroBlockBegin: ''
|
MacroBlockBegin: ''
|
||||||
MacroBlockEnd: ''
|
MacroBlockEnd: ''
|
||||||
MaxEmptyLinesToKeep: 1
|
MaxEmptyLinesToKeep: 1
|
||||||
|
@ -119,34 +160,44 @@ ObjCBlockIndentWidth: 4
|
||||||
ObjCBreakBeforeNestedBlockParam: true
|
ObjCBreakBeforeNestedBlockParam: true
|
||||||
ObjCSpaceAfterProperty: true
|
ObjCSpaceAfterProperty: true
|
||||||
ObjCSpaceBeforeProtocolList: true
|
ObjCSpaceBeforeProtocolList: true
|
||||||
|
PackConstructorInitializers: BinPack
|
||||||
PenaltyBreakAssignment: 10
|
PenaltyBreakAssignment: 10
|
||||||
PenaltyBreakBeforeFirstCallParameter: 30
|
PenaltyBreakBeforeFirstCallParameter: 30
|
||||||
PenaltyBreakComment: 10
|
PenaltyBreakComment: 10
|
||||||
PenaltyBreakFirstLessLess: 0
|
PenaltyBreakFirstLessLess: 0
|
||||||
PenaltyBreakOpenParenthesis: 0
|
PenaltyBreakOpenParenthesis: 0
|
||||||
|
PenaltyBreakScopeResolution: 500
|
||||||
PenaltyBreakString: 10
|
PenaltyBreakString: 10
|
||||||
PenaltyBreakTemplateDeclaration: 10
|
PenaltyBreakTemplateDeclaration: 10
|
||||||
PenaltyExcessCharacter: 100
|
PenaltyExcessCharacter: 100
|
||||||
PenaltyReturnTypeOnItsOwnLine: 60
|
|
||||||
PenaltyIndentedWhitespace: 0
|
PenaltyIndentedWhitespace: 0
|
||||||
|
PenaltyReturnTypeOnItsOwnLine: 60
|
||||||
PointerAlignment: Left
|
PointerAlignment: Left
|
||||||
PPIndentWidth: -1
|
PPIndentWidth: -1
|
||||||
|
QualifierAlignment: Leave
|
||||||
ReferenceAlignment: Pointer
|
ReferenceAlignment: Pointer
|
||||||
ReflowComments: false
|
ReflowComments: false
|
||||||
RemoveBracesLLVM: false
|
RemoveBracesLLVM: false
|
||||||
|
RemoveParentheses: Leave
|
||||||
|
RemoveSemicolon: false
|
||||||
|
RequiresClausePosition: OwnLine
|
||||||
|
RequiresExpressionIndentation: OuterScope
|
||||||
SeparateDefinitionBlocks: Leave
|
SeparateDefinitionBlocks: Leave
|
||||||
ShortNamespaceLines: 1
|
ShortNamespaceLines: 1
|
||||||
|
SkipMacroDefinitionBody: false
|
||||||
SortIncludes: Never
|
SortIncludes: Never
|
||||||
SortJavaStaticImport: Before
|
SortJavaStaticImport: Before
|
||||||
SortUsingDeclarations: false
|
SortUsingDeclarations: Never
|
||||||
SpaceAfterCStyleCast: false
|
SpaceAfterCStyleCast: false
|
||||||
SpaceAfterLogicalNot: false
|
SpaceAfterLogicalNot: false
|
||||||
SpaceAfterTemplateKeyword: true
|
SpaceAfterTemplateKeyword: true
|
||||||
|
SpaceAroundPointerQualifiers: Default
|
||||||
SpaceBeforeAssignmentOperators: true
|
SpaceBeforeAssignmentOperators: true
|
||||||
SpaceBeforeCaseColon: false
|
SpaceBeforeCaseColon: false
|
||||||
SpaceBeforeCpp11BracedList: false
|
SpaceBeforeCpp11BracedList: false
|
||||||
SpaceBeforeCtorInitializerColon: true
|
SpaceBeforeCtorInitializerColon: true
|
||||||
SpaceBeforeInheritanceColon: true
|
SpaceBeforeInheritanceColon: true
|
||||||
|
SpaceBeforeJsonColon: false
|
||||||
SpaceBeforeParens: Never
|
SpaceBeforeParens: Never
|
||||||
SpaceBeforeParensOptions:
|
SpaceBeforeParensOptions:
|
||||||
AfterControlStatements: false
|
AfterControlStatements: false
|
||||||
|
@ -155,23 +206,26 @@ SpaceBeforeParensOptions:
|
||||||
AfterFunctionDeclarationName: false
|
AfterFunctionDeclarationName: false
|
||||||
AfterIfMacros: false
|
AfterIfMacros: false
|
||||||
AfterOverloadedOperator: false
|
AfterOverloadedOperator: false
|
||||||
|
AfterPlacementOperator: true
|
||||||
|
AfterRequiresInClause: false
|
||||||
|
AfterRequiresInExpression: false
|
||||||
BeforeNonEmptyParentheses: false
|
BeforeNonEmptyParentheses: false
|
||||||
SpaceAroundPointerQualifiers: Default
|
|
||||||
SpaceBeforeRangeBasedForLoopColon: true
|
SpaceBeforeRangeBasedForLoopColon: true
|
||||||
|
SpaceBeforeSquareBrackets: false
|
||||||
SpaceInEmptyBlock: false
|
SpaceInEmptyBlock: false
|
||||||
SpaceInEmptyParentheses: false
|
|
||||||
SpacesBeforeTrailingComments: 1
|
SpacesBeforeTrailingComments: 1
|
||||||
SpacesInAngles: Never
|
SpacesInAngles: Never
|
||||||
SpacesInConditionalStatement: false
|
|
||||||
SpacesInContainerLiterals: false
|
SpacesInContainerLiterals: false
|
||||||
SpacesInCStyleCastParentheses: false
|
|
||||||
SpacesInLineCommentPrefix:
|
SpacesInLineCommentPrefix:
|
||||||
Minimum: 1
|
Minimum: 1
|
||||||
Maximum: -1
|
Maximum: -1
|
||||||
SpacesInParentheses: false
|
SpacesInParens: Never
|
||||||
|
SpacesInParensOptions:
|
||||||
|
InCStyleCasts: false
|
||||||
|
InConditionalStatements: false
|
||||||
|
InEmptyParentheses: false
|
||||||
|
Other: false
|
||||||
SpacesInSquareBrackets: false
|
SpacesInSquareBrackets: false
|
||||||
SpaceBeforeSquareBrackets: false
|
|
||||||
BitFieldColonSpacing: Both
|
|
||||||
Standard: c++03
|
Standard: c++03
|
||||||
StatementAttributeLikeMacros:
|
StatementAttributeLikeMacros:
|
||||||
- Q_EMIT
|
- Q_EMIT
|
||||||
|
@ -179,8 +233,8 @@ StatementMacros:
|
||||||
- Q_UNUSED
|
- Q_UNUSED
|
||||||
- QT_REQUIRE_VERSION
|
- QT_REQUIRE_VERSION
|
||||||
TabWidth: 4
|
TabWidth: 4
|
||||||
UseCRLF: false
|
|
||||||
UseTab: Never
|
UseTab: Never
|
||||||
|
VerilogBreakBetweenInstancePorts: true
|
||||||
WhitespaceSensitiveMacros:
|
WhitespaceSensitiveMacros:
|
||||||
- STRINGIZE
|
- STRINGIZE
|
||||||
- PP_STRINGIZE
|
- PP_STRINGIZE
|
||||||
|
|
|
@ -384,8 +384,7 @@ BtTestParam* bt_test_param_add(
|
||||||
|
|
||||||
void bt_test_set_rssi(BtTest* bt_test, float rssi) {
|
void bt_test_set_rssi(BtTest* bt_test, float rssi) {
|
||||||
furi_assert(bt_test);
|
furi_assert(bt_test);
|
||||||
with_view_model(
|
with_view_model(bt_test->view, BtTestModel * model, { model->rssi = rssi; }, true);
|
||||||
bt_test->view, BtTestModel * model, { model->rssi = rssi; }, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void bt_test_set_packets_tx(BtTest* bt_test, uint32_t packets_num) {
|
void bt_test_set_packets_tx(BtTest* bt_test, uint32_t packets_num) {
|
||||||
|
|
|
@ -150,8 +150,7 @@ static void view_display_test_exit(void* context) {
|
||||||
|
|
||||||
static void view_display_test_timer_callback(void* context) {
|
static void view_display_test_timer_callback(void* context) {
|
||||||
ViewDisplayTest* instance = context;
|
ViewDisplayTest* instance = context;
|
||||||
with_view_model(
|
with_view_model(instance->view, ViewDisplayTestModel * model, { model->counter++; }, true);
|
||||||
instance->view, ViewDisplayTestModel * model, { model->counter++; }, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewDisplayTest* view_display_test_alloc(void) {
|
ViewDisplayTest* view_display_test_alloc(void) {
|
||||||
|
|
|
@ -223,16 +223,14 @@ bool lfrfid_debug_view_tune_is_dirty(LfRfidTuneView* tune_view) {
|
||||||
|
|
||||||
uint32_t lfrfid_debug_view_tune_get_arr(LfRfidTuneView* tune_view) {
|
uint32_t lfrfid_debug_view_tune_get_arr(LfRfidTuneView* tune_view) {
|
||||||
uint32_t result = false;
|
uint32_t result = false;
|
||||||
with_view_model(
|
with_view_model(tune_view->view, LfRfidTuneViewModel * model, { result = model->ARR; }, false);
|
||||||
tune_view->view, LfRfidTuneViewModel * model, { result = model->ARR; }, false);
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t lfrfid_debug_view_tune_get_ccr(LfRfidTuneView* tune_view) {
|
uint32_t lfrfid_debug_view_tune_get_ccr(LfRfidTuneView* tune_view) {
|
||||||
uint32_t result = false;
|
uint32_t result = false;
|
||||||
with_view_model(
|
with_view_model(tune_view->view, LfRfidTuneViewModel * model, { result = model->CCR; }, false);
|
||||||
tune_view->view, LfRfidTuneViewModel * model, { result = model->CCR; }, false);
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,8 +206,7 @@ static int32_t uart_echo_worker(void* context) {
|
||||||
} while(length > 0);
|
} while(length > 0);
|
||||||
|
|
||||||
notification_message(app->notification, &sequence_notification);
|
notification_message(app->notification, &sequence_notification);
|
||||||
with_view_model(
|
with_view_model(app->view, UartDumpModel * model, { UNUSED(model); }, true);
|
||||||
app->view, UartDumpModel * model, { UNUSED(model); }, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(events & WorkerEventRxIdle) {
|
if(events & WorkerEventRxIdle) {
|
||||||
|
|
|
@ -74,7 +74,8 @@ MU_TEST(furi_hal_i2c_int_3b) {
|
||||||
DATA_SIZE - 1,
|
DATA_SIZE - 1,
|
||||||
LP5562_I2C_TIMEOUT);
|
LP5562_I2C_TIMEOUT);
|
||||||
mu_assert(ret, "4 rx failed");
|
mu_assert(ret, "4 rx failed");
|
||||||
for(size_t i = 0; i < DATA_SIZE; i++) mu_assert(data_many[i] != 0, "4 invalid data_many");
|
for(size_t i = 0; i < DATA_SIZE; i++)
|
||||||
|
mu_assert(data_many[i] != 0, "4 invalid data_many");
|
||||||
|
|
||||||
ret = furi_hal_i2c_tx(
|
ret = furi_hal_i2c_tx(
|
||||||
&furi_hal_i2c_handle_power, LP5562_ADDRESS, data_many, DATA_SIZE, LP5562_I2C_TIMEOUT);
|
&furi_hal_i2c_handle_power, LP5562_ADDRESS, data_many, DATA_SIZE, LP5562_I2C_TIMEOUT);
|
||||||
|
@ -90,7 +91,8 @@ MU_TEST(furi_hal_i2c_int_3b) {
|
||||||
DATA_SIZE - 1,
|
DATA_SIZE - 1,
|
||||||
LP5562_I2C_TIMEOUT);
|
LP5562_I2C_TIMEOUT);
|
||||||
mu_assert(ret, "7 rx failed");
|
mu_assert(ret, "7 rx failed");
|
||||||
for(size_t i = 0; i < DATA_SIZE; i++) mu_assert(data_many[i] != 0, "7 invalid data_many");
|
for(size_t i = 0; i < DATA_SIZE; i++)
|
||||||
|
mu_assert(data_many[i] != 0, "7 invalid data_many");
|
||||||
}
|
}
|
||||||
|
|
||||||
MU_TEST(furi_hal_i2c_int_1b_fail) {
|
MU_TEST(furi_hal_i2c_int_1b_fail) {
|
||||||
|
|
|
@ -6,8 +6,7 @@
|
||||||
|
|
||||||
#define LF_RFID_READ_TIMING_MULTIPLIER 8
|
#define LF_RFID_READ_TIMING_MULTIPLIER 8
|
||||||
|
|
||||||
#define EM_TEST_DATA \
|
#define EM_TEST_DATA {0x58, 0x00, 0x85, 0x64, 0x02}
|
||||||
{ 0x58, 0x00, 0x85, 0x64, 0x02 }
|
|
||||||
#define EM_TEST_DATA_SIZE 5
|
#define EM_TEST_DATA_SIZE 5
|
||||||
#define EM_TEST_EMULATION_TIMINGS_COUNT (64 * 2)
|
#define EM_TEST_EMULATION_TIMINGS_COUNT (64 * 2)
|
||||||
|
|
||||||
|
@ -21,8 +20,7 @@ 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,
|
-32, 32, 32, -32, -32, 32, -32, 32, -32, 32, -32, 32, -32, 32,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define HID10301_TEST_DATA \
|
#define HID10301_TEST_DATA {0x8D, 0x48, 0xA8}
|
||||||
{ 0x8D, 0x48, 0xA8 }
|
|
||||||
#define HID10301_TEST_DATA_SIZE 3
|
#define HID10301_TEST_DATA_SIZE 3
|
||||||
#define HID10301_TEST_EMULATION_TIMINGS_COUNT (541 * 2)
|
#define HID10301_TEST_EMULATION_TIMINGS_COUNT (541 * 2)
|
||||||
|
|
||||||
|
@ -71,8 +69,7 @@ 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,
|
5, -5, 4, -4, 4, -4, 4, -4, 4, -4, 4, -4, 4, -4, 4, -4,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define IOPROX_XSF_TEST_DATA \
|
#define IOPROX_XSF_TEST_DATA {0x65, 0x01, 0x05, 0x39}
|
||||||
{ 0x65, 0x01, 0x05, 0x39 }
|
|
||||||
#define IOPROX_XSF_TEST_DATA_SIZE 4
|
#define IOPROX_XSF_TEST_DATA_SIZE 4
|
||||||
#define IOPROX_XSF_TEST_EMULATION_TIMINGS_COUNT (468 * 2)
|
#define IOPROX_XSF_TEST_EMULATION_TIMINGS_COUNT (468 * 2)
|
||||||
|
|
||||||
|
@ -116,8 +113,7 @@ const int8_t ioprox_xsf_test_timings[IOPROX_XSF_TEST_EMULATION_TIMINGS_COUNT] =
|
||||||
};
|
};
|
||||||
|
|
||||||
#define INDALA26_EMULATION_TIMINGS_COUNT (1024 * 2)
|
#define INDALA26_EMULATION_TIMINGS_COUNT (1024 * 2)
|
||||||
#define INDALA26_TEST_DATA \
|
#define INDALA26_TEST_DATA {0x3B, 0x73, 0x64, 0xA8}
|
||||||
{ 0x3B, 0x73, 0x64, 0xA8 }
|
|
||||||
#define INDALA26_TEST_DATA_SIZE 4
|
#define INDALA26_TEST_DATA_SIZE 4
|
||||||
|
|
||||||
const int8_t indala26_test_timings[INDALA26_EMULATION_TIMINGS_COUNT] = {
|
const int8_t indala26_test_timings[INDALA26_EMULATION_TIMINGS_COUNT] = {
|
||||||
|
@ -209,8 +205,7 @@ 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,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define FDXB_TEST_DATA \
|
#define FDXB_TEST_DATA {0x44, 0x88, 0x23, 0xF2, 0x5A, 0x6F, 0x00, 0x01, 0x00, 0x00, 0x00}
|
||||||
{ 0x44, 0x88, 0x23, 0xF2, 0x5A, 0x6F, 0x00, 0x01, 0x00, 0x00, 0x00 }
|
|
||||||
#define FDXB_TEST_DATA_SIZE 11
|
#define FDXB_TEST_DATA_SIZE 11
|
||||||
#define FDXB_TEST_EMULATION_TIMINGS_COUNT (206)
|
#define FDXB_TEST_EMULATION_TIMINGS_COUNT (206)
|
||||||
|
|
||||||
|
|
|
@ -97,6 +97,5 @@ void u2f_view_set_ok_callback(U2fView* u2f, U2fOkCallback callback, void* contex
|
||||||
}
|
}
|
||||||
|
|
||||||
void u2f_view_set_state(U2fView* u2f, U2fViewMsg msg) {
|
void u2f_view_set_state(U2fView* u2f, U2fViewMsg msg) {
|
||||||
with_view_model(
|
with_view_model(u2f->view, U2fModel * model, { model->display_msg = msg; }, true);
|
||||||
u2f->view, U2fModel * model, { model->display_msg = msg; }, true);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,8 @@ void cli_command_help(Cli* cli, FuriString* args, void* context) {
|
||||||
CliCommandTree_it(it_left, cli->commands);
|
CliCommandTree_it(it_left, cli->commands);
|
||||||
CliCommandTree_it_t it_right;
|
CliCommandTree_it_t it_right;
|
||||||
CliCommandTree_it(it_right, cli->commands);
|
CliCommandTree_it(it_right, cli->commands);
|
||||||
for(size_t i = 0; i < commands_count_mid; i++) CliCommandTree_next(it_right);
|
for(size_t i = 0; i < commands_count_mid; i++)
|
||||||
|
CliCommandTree_next(it_right);
|
||||||
|
|
||||||
// Iterate throw tree
|
// Iterate throw tree
|
||||||
for(size_t i = 0; i < commands_count_mid; i++) {
|
for(size_t i = 0; i < commands_count_mid; i++) {
|
||||||
|
|
|
@ -321,8 +321,7 @@ void button_menu_reset(ButtonMenu* button_menu) {
|
||||||
void button_menu_set_header(ButtonMenu* button_menu, const char* header) {
|
void button_menu_set_header(ButtonMenu* button_menu, const char* header) {
|
||||||
furi_check(button_menu);
|
furi_check(button_menu);
|
||||||
|
|
||||||
with_view_model(
|
with_view_model(button_menu->view, ButtonMenuModel * model, { model->header = header; }, true);
|
||||||
button_menu->view, ButtonMenuModel * model, { model->header = header; }, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ButtonMenuItem* button_menu_add_item(
|
ButtonMenuItem* button_menu_add_item(
|
||||||
|
|
|
@ -868,6 +868,5 @@ void byte_input_set_result_callback(
|
||||||
void byte_input_set_header_text(ByteInput* byte_input, const char* text) {
|
void byte_input_set_header_text(ByteInput* byte_input, const char* text) {
|
||||||
furi_check(byte_input);
|
furi_check(byte_input);
|
||||||
|
|
||||||
with_view_model(
|
with_view_model(byte_input->view, ByteInputModel * model, { model->header = text; }, true);
|
||||||
byte_input->view, ByteInputModel * model, { model->header = text; }, true);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -257,20 +257,17 @@ void dialog_ex_set_icon(DialogEx* dialog_ex, uint8_t x, uint8_t y, const Icon* i
|
||||||
|
|
||||||
void dialog_ex_set_left_button_text(DialogEx* dialog_ex, const char* text) {
|
void dialog_ex_set_left_button_text(DialogEx* dialog_ex, const char* text) {
|
||||||
furi_check(dialog_ex);
|
furi_check(dialog_ex);
|
||||||
with_view_model(
|
with_view_model(dialog_ex->view, DialogExModel * model, { model->left_text = text; }, true);
|
||||||
dialog_ex->view, DialogExModel * model, { model->left_text = text; }, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void dialog_ex_set_center_button_text(DialogEx* dialog_ex, const char* text) {
|
void dialog_ex_set_center_button_text(DialogEx* dialog_ex, const char* text) {
|
||||||
furi_check(dialog_ex);
|
furi_check(dialog_ex);
|
||||||
with_view_model(
|
with_view_model(dialog_ex->view, DialogExModel * model, { model->center_text = text; }, true);
|
||||||
dialog_ex->view, DialogExModel * model, { model->center_text = text; }, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void dialog_ex_set_right_button_text(DialogEx* dialog_ex, const char* text) {
|
void dialog_ex_set_right_button_text(DialogEx* dialog_ex, const char* text) {
|
||||||
furi_check(dialog_ex);
|
furi_check(dialog_ex);
|
||||||
with_view_model(
|
with_view_model(dialog_ex->view, DialogExModel * model, { model->right_text = text; }, true);
|
||||||
dialog_ex->view, DialogExModel * model, { model->right_text = text; }, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void dialog_ex_reset(DialogEx* dialog_ex) {
|
void dialog_ex_reset(DialogEx* dialog_ex) {
|
||||||
|
|
|
@ -142,15 +142,13 @@ static void browser_long_load_cb(void* context);
|
||||||
static void file_browser_scroll_timer_callback(void* context) {
|
static void file_browser_scroll_timer_callback(void* context) {
|
||||||
furi_check(context);
|
furi_check(context);
|
||||||
FileBrowser* browser = context;
|
FileBrowser* browser = context;
|
||||||
with_view_model(
|
with_view_model(browser->view, FileBrowserModel * model, { model->scroll_counter++; }, true);
|
||||||
browser->view, FileBrowserModel * model, { model->scroll_counter++; }, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void file_browser_view_enter_callback(void* context) {
|
static void file_browser_view_enter_callback(void* context) {
|
||||||
furi_check(context);
|
furi_check(context);
|
||||||
FileBrowser* browser = context;
|
FileBrowser* browser = context;
|
||||||
with_view_model(
|
with_view_model(browser->view, FileBrowserModel * model, { model->scroll_counter = 0; }, true);
|
||||||
browser->view, FileBrowserModel * model, { model->scroll_counter = 0; }, true);
|
|
||||||
furi_timer_start(browser->scroll_timer, SCROLL_INTERVAL);
|
furi_timer_start(browser->scroll_timer, SCROLL_INTERVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -149,8 +149,7 @@ void menu_free(Menu* menu) {
|
||||||
furi_check(menu);
|
furi_check(menu);
|
||||||
|
|
||||||
menu_reset(menu);
|
menu_reset(menu);
|
||||||
with_view_model(
|
with_view_model(menu->view, MenuModel * model, { MenuItemArray_clear(model->items); }, false);
|
||||||
menu->view, MenuModel * model, { MenuItemArray_clear(model->items); }, false);
|
|
||||||
view_free(menu->view);
|
view_free(menu->view);
|
||||||
|
|
||||||
free(menu);
|
free(menu);
|
||||||
|
|
|
@ -355,13 +355,11 @@ void text_box_set_text(TextBox* text_box, const char* text) {
|
||||||
void text_box_set_font(TextBox* text_box, TextBoxFont font) {
|
void text_box_set_font(TextBox* text_box, TextBoxFont font) {
|
||||||
furi_check(text_box);
|
furi_check(text_box);
|
||||||
|
|
||||||
with_view_model(
|
with_view_model(text_box->view, TextBoxModel * model, { model->font = font; }, true);
|
||||||
text_box->view, TextBoxModel * model, { model->font = font; }, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void text_box_set_focus(TextBox* text_box, TextBoxFocus focus) {
|
void text_box_set_focus(TextBox* text_box, TextBoxFocus focus) {
|
||||||
furi_check(text_box);
|
furi_check(text_box);
|
||||||
|
|
||||||
with_view_model(
|
with_view_model(text_box->view, TextBoxModel * model, { model->focus = focus; }, true);
|
||||||
text_box->view, TextBoxModel * model, { model->focus = focus; }, true);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -570,6 +570,5 @@ void* text_input_get_validator_callback_context(TextInput* text_input) {
|
||||||
|
|
||||||
void text_input_set_header_text(TextInput* text_input, const char* text) {
|
void text_input_set_header_text(TextInput* text_input, const char* text) {
|
||||||
furi_check(text_input);
|
furi_check(text_input);
|
||||||
with_view_model(
|
with_view_model(text_input->view, TextInputModel * model, { model->header = text; }, true);
|
||||||
text_input->view, TextInputModel * model, { model->header = text; }, true);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,8 @@ void view_holder_start(ViewHolder* view_holder) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void view_holder_stop(ViewHolder* view_holder) {
|
void view_holder_stop(ViewHolder* view_holder) {
|
||||||
while(view_holder->ongoing_input) furi_delay_tick(1);
|
while(view_holder->ongoing_input)
|
||||||
|
furi_delay_tick(1);
|
||||||
view_port_enabled_set(view_holder->view_port, false);
|
view_port_enabled_set(view_holder->view_port, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,8 @@ int32_t input_srv(void* p) {
|
||||||
} else {
|
} else {
|
||||||
event.sequence_counter = pin_states[i].counter;
|
event.sequence_counter = pin_states[i].counter;
|
||||||
furi_timer_stop(pin_states[i].press_timer);
|
furi_timer_stop(pin_states[i].press_timer);
|
||||||
while(furi_timer_is_running(pin_states[i].press_timer)) furi_delay_tick(1);
|
while(furi_timer_is_running(pin_states[i].press_timer))
|
||||||
|
furi_delay_tick(1);
|
||||||
if(pin_states[i].press_counter < INPUT_LONG_PRESS_COUNTS) {
|
if(pin_states[i].press_counter < INPUT_LONG_PRESS_COUNTS) {
|
||||||
event.type = InputTypeShort;
|
event.type = InputTypeShort;
|
||||||
furi_pubsub_publish(event_pubsub, &event);
|
furi_pubsub_publish(event_pubsub, &event);
|
||||||
|
|
|
@ -400,8 +400,7 @@ HidKeyboard* hid_keyboard_alloc(Hid* bt_hid) {
|
||||||
view_set_draw_callback(hid_keyboard->view, hid_keyboard_draw_callback);
|
view_set_draw_callback(hid_keyboard->view, hid_keyboard_draw_callback);
|
||||||
view_set_input_callback(hid_keyboard->view, hid_keyboard_input_callback);
|
view_set_input_callback(hid_keyboard->view, hid_keyboard_input_callback);
|
||||||
|
|
||||||
with_view_model(
|
with_view_model(hid_keyboard->view, HidKeyboardModel * model, { model->y = 1; }, true);
|
||||||
hid_keyboard->view, HidKeyboardModel * model, { model->y = 1; }, true);
|
|
||||||
|
|
||||||
return hid_keyboard;
|
return hid_keyboard;
|
||||||
}
|
}
|
||||||
|
|
|
@ -237,7 +237,10 @@ typedef struct {
|
||||||
} UpdateTaskStageGroupMap;
|
} UpdateTaskStageGroupMap;
|
||||||
|
|
||||||
#define STAGE_DEF(GROUP, WEIGHT) \
|
#define STAGE_DEF(GROUP, WEIGHT) \
|
||||||
{ .group = (GROUP), .weight = (WEIGHT), }
|
{ \
|
||||||
|
.group = (GROUP), \
|
||||||
|
.weight = (WEIGHT), \
|
||||||
|
}
|
||||||
|
|
||||||
static const UpdateTaskStageGroupMap update_task_stage_progress[] = {
|
static const UpdateTaskStageGroupMap update_task_stage_progress[] = {
|
||||||
[UpdateTaskStageProgress] = STAGE_DEF(UpdateTaskStageGroupMisc, 0),
|
[UpdateTaskStageProgress] = STAGE_DEF(UpdateTaskStageGroupMisc, 0),
|
||||||
|
|
|
@ -17,7 +17,7 @@ extern "C" {
|
||||||
/**
|
/**
|
||||||
* @brief Furi string failure constant.
|
* @brief Furi string failure constant.
|
||||||
*/
|
*/
|
||||||
#define FURI_STRING_FAILURE ((size_t)-1)
|
#define FURI_STRING_FAILURE ((size_t) - 1)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Furi string primitive.
|
* @brief Furi string primitive.
|
||||||
|
|
|
@ -4,7 +4,7 @@ public:
|
||||||
virtual void on_enter(TApp* app, bool need_restore) = 0;
|
virtual void on_enter(TApp* app, bool need_restore) = 0;
|
||||||
virtual bool on_event(TApp* app, typename TApp::Event* event) = 0;
|
virtual bool on_event(TApp* app, typename TApp::Event* event) = 0;
|
||||||
virtual void on_exit(TApp* app) = 0;
|
virtual void on_exit(TApp* app) = 0;
|
||||||
virtual ~GenericScene(){};
|
virtual ~GenericScene() {};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|
|
@ -175,7 +175,8 @@ public:
|
||||||
bool switch_to_previous_scene(uint8_t count = 1) {
|
bool switch_to_previous_scene(uint8_t count = 1) {
|
||||||
auto previous_scene_index = TApp::SceneType::Start;
|
auto previous_scene_index = TApp::SceneType::Start;
|
||||||
|
|
||||||
for(uint8_t i = 0; i < count; i++) previous_scene_index = get_previous_scene_index();
|
for(uint8_t i = 0; i < count; i++)
|
||||||
|
previous_scene_index = get_previous_scene_index();
|
||||||
|
|
||||||
if(previous_scene_index == TApp::SceneType::Exit) return true;
|
if(previous_scene_index == TApp::SceneType::Exit) return true;
|
||||||
|
|
||||||
|
@ -198,7 +199,8 @@ public:
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
~SceneController() {
|
~SceneController() {
|
||||||
for(auto& it : scenes) delete it.second;
|
for(auto& it : scenes)
|
||||||
|
delete it.second;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
|
|
||||||
class GenericViewModule {
|
class GenericViewModule {
|
||||||
public:
|
public:
|
||||||
GenericViewModule(){};
|
GenericViewModule() {};
|
||||||
virtual ~GenericViewModule(){};
|
virtual ~GenericViewModule() {};
|
||||||
virtual View* get_view() = 0;
|
virtual View* get_view() = 0;
|
||||||
virtual void clean() = 0;
|
virtual void clean() = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TOPBIT(X) (1 << ((X)-1))
|
#define TOPBIT(X) (1 << ((X) - 1))
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
BitLibParityEven,
|
BitLibParityEven,
|
||||||
|
|
|
@ -137,7 +137,8 @@ bool protocol_pac_stanley_encoder_start(ProtocolPACStanley* protocol) {
|
||||||
uint8_to_hex_chars(protocol->data, &idbytes[2], 8);
|
uint8_to_hex_chars(protocol->data, &idbytes[2], 8);
|
||||||
|
|
||||||
// insert start and stop bits
|
// insert start and stop bits
|
||||||
for(size_t i = 0; i < 16; i++) protocol->encoded_data[i] = 0x40 >> ((i + 3) % 5 * 2);
|
for(size_t i = 0; i < 16; i++)
|
||||||
|
protocol->encoded_data[i] = 0x40 >> ((i + 3) % 5 * 2);
|
||||||
|
|
||||||
protocol->encoded_data[0] = 0xFF; // mark + stop
|
protocol->encoded_data[0] = 0xFF; // mark + stop
|
||||||
protocol->encoded_data[1] = 0x20; // start + reflect8(STX)
|
protocol->encoded_data[1] = 0x20; // start + reflect8(STX)
|
||||||
|
|
|
@ -126,7 +126,8 @@ bool protocol_pyramid_decoder_feed(ProtocolPyramid* protocol, bool level, uint32
|
||||||
|
|
||||||
bool protocol_pyramid_get_parity(const uint8_t* bits, uint8_t type, int length) {
|
bool protocol_pyramid_get_parity(const uint8_t* bits, uint8_t type, int length) {
|
||||||
int x;
|
int x;
|
||||||
for(x = 0; length > 0; --length) x += bit_lib_get_bit(bits, length - 1);
|
for(x = 0; length > 0; --length)
|
||||||
|
x += bit_lib_get_bit(bits, length - 1);
|
||||||
x %= 2;
|
x %= 2;
|
||||||
return x ^ type;
|
return x ^ type;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit afc499f9a410fc9bbf6c9c48cdd8d8b199d49eb4
|
Subproject commit 6cfe48d6f1593f8fa5c0f90437f5e6522587745e
|
|
@ -84,7 +84,8 @@ uint32_t crypto1_word(Crypto1* crypto1, uint32_t in, int is_encrypted) {
|
||||||
|
|
||||||
uint32_t prng_successor(uint32_t x, uint32_t n) {
|
uint32_t prng_successor(uint32_t x, uint32_t n) {
|
||||||
SWAPENDIAN(x);
|
SWAPENDIAN(x);
|
||||||
while(n--) x = x >> 1 | (x >> 16 ^ x >> 18 ^ x >> 19 ^ x >> 21) << 31;
|
while(n--)
|
||||||
|
x = x >> 1 | (x >> 16 ^ x >> 18 ^ x >> 19 ^ x >> 21) << 31;
|
||||||
|
|
||||||
return SWAPENDIAN(x);
|
return SWAPENDIAN(x);
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,7 +190,8 @@ void nfc_poller_start_ex(NfcPoller* instance, NfcGenericCallbackEx callback, voi
|
||||||
NfcProtocol parent_protocol = nfc_protocol_get_parent(instance->protocol);
|
NfcProtocol parent_protocol = nfc_protocol_get_parent(instance->protocol);
|
||||||
if(parent_protocol != NfcProtocolInvalid) {
|
if(parent_protocol != NfcProtocolInvalid) {
|
||||||
NfcPollerListElement* iter = instance->list.head;
|
NfcPollerListElement* iter = instance->list.head;
|
||||||
while(iter->protocol != parent_protocol) iter = iter->child;
|
while(iter->protocol != parent_protocol)
|
||||||
|
iter = iter->child;
|
||||||
|
|
||||||
iter->poller_api->set_callback(iter->poller, nfc_poller_start_ex_tail_callback, instance);
|
iter->poller_api->set_callback(iter->poller, nfc_poller_start_ex_tail_callback, instance);
|
||||||
}
|
}
|
||||||
|
@ -254,7 +255,8 @@ bool nfc_poller_detect(NfcPoller* instance) {
|
||||||
NfcPollerListElement* iter = instance->list.head;
|
NfcPollerListElement* iter = instance->list.head;
|
||||||
|
|
||||||
if(tail_poller != instance->list.head) {
|
if(tail_poller != instance->list.head) {
|
||||||
while(iter->child != tail_poller) iter = iter->child;
|
while(iter->child != tail_poller)
|
||||||
|
iter = iter->child;
|
||||||
iter->poller_api->set_callback(iter->poller, nfc_poller_detect_tail_callback, instance);
|
iter->poller_api->set_callback(iter->poller, nfc_poller_detect_tail_callback, instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -155,7 +155,8 @@ static void mf_ultralight_format_mirror_data(
|
||||||
FuriString* str,
|
FuriString* str,
|
||||||
const uint8_t* const data,
|
const uint8_t* const data,
|
||||||
const uint8_t data_len) {
|
const uint8_t data_len) {
|
||||||
for(uint8_t i = 0; i < data_len; i++) furi_string_cat_printf(str, "%02X", data[i]);
|
for(uint8_t i = 0; i < data_len; i++)
|
||||||
|
furi_string_cat_printf(str, "%02X", data[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void mf_ultralight_mirror_read_prepare(uint8_t start_page, MfUltralightListener* instance) {
|
void mf_ultralight_mirror_read_prepare(uint8_t start_page, MfUltralightListener* instance) {
|
||||||
|
|
|
@ -224,7 +224,8 @@ void onewire_host_target_search(OneWireHost* host, uint8_t family_code) {
|
||||||
furi_check(host);
|
furi_check(host);
|
||||||
|
|
||||||
host->saved_rom[0] = family_code;
|
host->saved_rom[0] = family_code;
|
||||||
for(uint8_t i = 1; i < 8; i++) host->saved_rom[i] = 0;
|
for(uint8_t i = 1; i < 8; i++)
|
||||||
|
host->saved_rom[i] = 0;
|
||||||
host->last_discrepancy = 64;
|
host->last_discrepancy = 64;
|
||||||
host->last_family_discrepancy = 0;
|
host->last_family_discrepancy = 0;
|
||||||
host->last_device_flag = false;
|
host->last_device_flag = false;
|
||||||
|
@ -341,7 +342,8 @@ bool onewire_host_search(OneWireHost* host, uint8_t* new_addr, OneWireHostSearch
|
||||||
host->last_family_discrepancy = 0;
|
host->last_family_discrepancy = 0;
|
||||||
search_result = false;
|
search_result = false;
|
||||||
} else {
|
} else {
|
||||||
for(int i = 0; i < 8; i++) new_addr[i] = host->saved_rom[i];
|
for(int i = 0; i < 8; i++)
|
||||||
|
new_addr[i] = host->saved_rom[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return search_result;
|
return search_result;
|
||||||
|
|
|
@ -616,7 +616,8 @@ static size_t _etoa(
|
||||||
FLAGS_ZEROPAD | FLAGS_PLUS);
|
FLAGS_ZEROPAD | FLAGS_PLUS);
|
||||||
// might need to right-pad spaces
|
// might need to right-pad spaces
|
||||||
if(flags & FLAGS_LEFT) {
|
if(flags & FLAGS_LEFT) {
|
||||||
while(idx - start_idx < width) out(' ', buffer, idx++, maxlen);
|
while(idx - start_idx < width)
|
||||||
|
out(' ', buffer, idx++, maxlen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return idx;
|
return idx;
|
||||||
|
|
|
@ -176,7 +176,8 @@ static bool keys_dict_get_next_key_str(KeysDict* instance, FuriString* key) {
|
||||||
|
|
||||||
furi_string_reset(key);
|
furi_string_reset(key);
|
||||||
|
|
||||||
while(!key_read && !is_endfile) key_read = keys_dict_read_key_line(instance, key, &is_endfile);
|
while(!key_read && !is_endfile)
|
||||||
|
key_read = keys_dict_read_key_line(instance, key, &is_endfile);
|
||||||
|
|
||||||
return key_read;
|
return key_read;
|
||||||
}
|
}
|
||||||
|
|
|
@ -584,7 +584,8 @@ void i2c_transfer(u8x8_t* u8x8, uint8_t adr, uint8_t cnt, uint8_t* data) {
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
i2c_start(u8x8);
|
i2c_start(u8x8);
|
||||||
i2c_write_byte(u8x8, adr);
|
i2c_write_byte(u8x8, adr);
|
||||||
for(i = 0; i < cnt; i++) i2c_write_byte(u8x8, data[i]);
|
for(i = 0; i < cnt; i++)
|
||||||
|
i2c_write_byte(u8x8, data[i]);
|
||||||
i2c_stop(u8x8);
|
i2c_stop(u8x8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,8 @@ void u8x8_SetupDefaults(u8x8_t* u8x8) {
|
||||||
#ifdef U8X8_USE_PINS
|
#ifdef U8X8_USE_PINS
|
||||||
{
|
{
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
for(i = 0; i < U8X8_PIN_CNT; i++) u8x8->pins[i] = U8X8_PIN_NONE;
|
for(i = 0; i < U8X8_PIN_CNT; i++)
|
||||||
|
u8x8->pins[i] = U8X8_PIN_NONE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ which is the name that most clang tools search for by default.
|
||||||
import fnmatch
|
import fnmatch
|
||||||
import itertools
|
import itertools
|
||||||
import json
|
import json
|
||||||
from shlex import join, split
|
from oslex import join, split
|
||||||
|
|
||||||
import SCons
|
import SCons
|
||||||
from SCons.Tool.asm import ASPPSuffixes, ASSuffixes
|
from SCons.Tool.asm import ASPPSuffixes, ASSuffixes
|
||||||
|
|
|
@ -13,7 +13,7 @@ if not ["%FBT_NOENV%"] == [""] (
|
||||||
exit /b 0
|
exit /b 0
|
||||||
)
|
)
|
||||||
|
|
||||||
set "FLIPPER_TOOLCHAIN_VERSION=33"
|
set "FLIPPER_TOOLCHAIN_VERSION=37"
|
||||||
|
|
||||||
if ["%FBT_TOOLCHAIN_PATH%"] == [""] (
|
if ["%FBT_TOOLCHAIN_PATH%"] == [""] (
|
||||||
set "FBT_TOOLCHAIN_PATH=%FBT_ROOT%"
|
set "FBT_TOOLCHAIN_PATH=%FBT_ROOT%"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
# public variables
|
# public variables
|
||||||
DEFAULT_SCRIPT_PATH="$(pwd -P)";
|
DEFAULT_SCRIPT_PATH="$(pwd -P)";
|
||||||
FBT_TOOLCHAIN_VERSION="${FBT_TOOLCHAIN_VERSION:-"33"}";
|
FBT_TOOLCHAIN_VERSION="${FBT_TOOLCHAIN_VERSION:-"37"}";
|
||||||
|
|
||||||
if [ -z ${FBT_TOOLCHAIN_PATH+x} ] ; then
|
if [ -z ${FBT_TOOLCHAIN_PATH+x} ] ; then
|
||||||
FBT_TOOLCHAIN_PATH_WAS_SET=0;
|
FBT_TOOLCHAIN_PATH_WAS_SET=0;
|
||||||
|
|
|
@ -21,8 +21,7 @@
|
||||||
|
|
||||||
#define TAG "FuriHalBt"
|
#define TAG "FuriHalBt"
|
||||||
|
|
||||||
#define furi_hal_bt_DEFAULT_MAC_ADDR \
|
#define furi_hal_bt_DEFAULT_MAC_ADDR {0x6c, 0x7a, 0xd8, 0xac, 0x57, 0x72}
|
||||||
{ 0x6c, 0x7a, 0xd8, 0xac, 0x57, 0x72 }
|
|
||||||
|
|
||||||
/* Time, in ms, to wait for mode transition before crashing */
|
/* Time, in ms, to wait for mode transition before crashing */
|
||||||
#define C2_MODE_SWITCH_TIMEOUT 10000
|
#define C2_MODE_SWITCH_TIMEOUT 10000
|
||||||
|
|
|
@ -509,8 +509,7 @@ typedef struct {
|
||||||
uint32_t* ob_register_address;
|
uint32_t* ob_register_address;
|
||||||
} FuriHalFlashObMapping;
|
} FuriHalFlashObMapping;
|
||||||
|
|
||||||
#define OB_REG_DEF(INDEX, REG) \
|
#define OB_REG_DEF(INDEX, REG) {.ob_reg = INDEX, .ob_register_address = (uint32_t*)(REG)}
|
||||||
{ .ob_reg = INDEX, .ob_register_address = (uint32_t*)(REG) }
|
|
||||||
|
|
||||||
static const FuriHalFlashObMapping furi_hal_flash_ob_reg_map[FURI_HAL_FLASH_OB_TOTAL_WORDS] = {
|
static const FuriHalFlashObMapping furi_hal_flash_ob_reg_map[FURI_HAL_FLASH_OB_TOTAL_WORDS] = {
|
||||||
OB_REG_DEF(FuriHalFlashObRegisterUserRead, (&FLASH->OPTR)),
|
OB_REG_DEF(FuriHalFlashObRegisterUserRead, (&FLASH->OPTR)),
|
||||||
|
|
|
@ -193,7 +193,8 @@ static void* ccid_set_string_descr(char* str) {
|
||||||
struct usb_string_descriptor* dev_str_desc = malloc(len * 2 + 2);
|
struct usb_string_descriptor* dev_str_desc = malloc(len * 2 + 2);
|
||||||
dev_str_desc->bLength = len * 2 + 2;
|
dev_str_desc->bLength = len * 2 + 2;
|
||||||
dev_str_desc->bDescriptorType = USB_DTYPE_STRING;
|
dev_str_desc->bDescriptorType = USB_DTYPE_STRING;
|
||||||
for(size_t i = 0; i < len; i++) dev_str_desc->wString[i] = str[i];
|
for(size_t i = 0; i < len; i++)
|
||||||
|
dev_str_desc->wString[i] = str[i];
|
||||||
|
|
||||||
return dev_str_desc;
|
return dev_str_desc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -368,7 +368,8 @@ static void* hid_set_string_descr(char* str) {
|
||||||
struct usb_string_descriptor* dev_str_desc = malloc(len * 2 + 2);
|
struct usb_string_descriptor* dev_str_desc = malloc(len * 2 + 2);
|
||||||
dev_str_desc->bLength = len * 2 + 2;
|
dev_str_desc->bLength = len * 2 + 2;
|
||||||
dev_str_desc->bDescriptorType = USB_DTYPE_STRING;
|
dev_str_desc->bDescriptorType = USB_DTYPE_STRING;
|
||||||
for(size_t i = 0; i < len; i++) dev_str_desc->wString[i] = str[i];
|
for(size_t i = 0; i < len; i++)
|
||||||
|
dev_str_desc->wString[i] = str[i];
|
||||||
|
|
||||||
return dev_str_desc;
|
return dev_str_desc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue