mirror of
https://github.com/bettse/seader.git
synced 2026-03-29 08:00:07 +00:00
0.104.0 format
This commit is contained in:
129
.clang-format
129
.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: true
|
||||||
|
AcrossEmptyLines: true
|
||||||
|
AcrossComments: true
|
||||||
|
AlignCompound: false
|
||||||
|
AlignFunctionPointers: false
|
||||||
|
PadOperators: true
|
||||||
|
AlignConsecutiveDeclarations:
|
||||||
|
Enabled: false
|
||||||
|
AcrossEmptyLines: false
|
||||||
|
AcrossComments: false
|
||||||
|
AlignCompound: false
|
||||||
|
AlignFunctionPointers: false
|
||||||
|
PadOperators: true
|
||||||
|
AlignConsecutiveMacros:
|
||||||
|
Enabled: true
|
||||||
|
AcrossEmptyLines: false
|
||||||
|
AcrossComments: true
|
||||||
|
AlignCompound: true
|
||||||
|
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: false
|
||||||
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,38 +80,35 @@ 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
|
||||||
- Q_FOREACH
|
- Q_FOREACH
|
||||||
- BOOST_FOREACH
|
- BOOST_FOREACH
|
||||||
|
- M_EACH
|
||||||
IfMacros:
|
IfMacros:
|
||||||
- KJ_IF_MAYBE
|
- KJ_IF_MAYBE
|
||||||
IncludeBlocks: Preserve
|
IncludeBlocks: Preserve
|
||||||
@@ -97,19 +128,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: true
|
||||||
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 +161,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: true
|
||||||
|
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,32 +207,35 @@ 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
|
Standard: c++20
|
||||||
BitFieldColonSpacing: Both
|
|
||||||
Standard: c++03
|
|
||||||
StatementAttributeLikeMacros:
|
StatementAttributeLikeMacros:
|
||||||
- Q_EMIT
|
- Q_EMIT
|
||||||
StatementMacros:
|
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
|
||||||
|
|||||||
34
assembly.h
34
assembly.h
@@ -27,8 +27,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
#define HIDDEN(name) .private_extern name
|
#define HIDDEN(name) .private_extern name
|
||||||
#define LOCAL_LABEL(name) L_##name
|
#define LOCAL_LABEL(name) L_##name
|
||||||
// tell linker it can break up file at label boundaries
|
// tell linker it can break up file at label boundaries
|
||||||
#define FILE_LEVEL_DIRECTIVE .subsections_via_symbols
|
#define FILE_LEVEL_DIRECTIVE .subsections_via_symbols
|
||||||
#define SYMBOL_IS_FUNC(name)
|
#define SYMBOL_IS_FUNC(name)
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
#elif defined(__ELF__)
|
#elif defined(__ELF__)
|
||||||
|
|
||||||
#define HIDDEN(name) .hidden name
|
#define HIDDEN(name) .hidden name
|
||||||
#define LOCAL_LABEL(name) .L_##name
|
#define LOCAL_LABEL(name) .L_##name
|
||||||
#define FILE_LEVEL_DIRECTIVE
|
#define FILE_LEVEL_DIRECTIVE
|
||||||
#if defined(__arm__) || defined(__aarch64__)
|
#if defined(__arm__) || defined(__aarch64__)
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
#define LOCAL_LABEL(name) .L##name
|
#define LOCAL_LABEL(name) .L##name
|
||||||
#define FILE_LEVEL_DIRECTIVE
|
#define FILE_LEVEL_DIRECTIVE
|
||||||
#define SYMBOL_IS_FUNC(name) .def name SEPARATOR.scl 2 SEPARATOR.type 32 SEPARATOR.endef
|
#define SYMBOL_IS_FUNC(name) .def name SEPARATOR.scl 2 SEPARATOR.type 32 SEPARATOR.endef
|
||||||
#define CONST_SECTION .section.rdata, "rd"
|
#define CONST_SECTION .section.rdata, "rd"
|
||||||
|
|
||||||
#define NO_EXEC_STACK_DIRECTIVE
|
#define NO_EXEC_STACK_DIRECTIVE
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// BTI and PAC gnu property note
|
// BTI and PAC gnu property note
|
||||||
#define NT_GNU_PROPERTY_TYPE_0 5
|
#define NT_GNU_PROPERTY_TYPE_0 5
|
||||||
#define GNU_PROPERTY_AARCH64_FEATURE_1_AND 0xc0000000
|
#define GNU_PROPERTY_AARCH64_FEATURE_1_AND 0xc0000000
|
||||||
#define GNU_PROPERTY_AARCH64_FEATURE_1_BTI 1
|
#define GNU_PROPERTY_AARCH64_FEATURE_1_BTI 1
|
||||||
#define GNU_PROPERTY_AARCH64_FEATURE_1_PAC 2
|
#define GNU_PROPERTY_AARCH64_FEATURE_1_PAC 2
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
|
|
||||||
#if defined(__clang__) || defined(__GCC_HAVE_DWARF2_CFI_ASM)
|
#if defined(__clang__) || defined(__GCC_HAVE_DWARF2_CFI_ASM)
|
||||||
#define CFI_START .cfi_startproc
|
#define CFI_START .cfi_startproc
|
||||||
#define CFI_END .cfi_endproc
|
#define CFI_END .cfi_endproc
|
||||||
#else
|
#else
|
||||||
#define CFI_START
|
#define CFI_START
|
||||||
#define CFI_END
|
#define CFI_END
|
||||||
@@ -124,11 +124,11 @@
|
|||||||
// - for '-mthumb -march=armv6' compiler defines '__thumb__'
|
// - for '-mthumb -march=armv6' compiler defines '__thumb__'
|
||||||
// - for '-mthumb -march=armv7' compiler defines '__thumb__' and '__thumb2__'
|
// - for '-mthumb -march=armv7' compiler defines '__thumb__' and '__thumb2__'
|
||||||
#if defined(__thumb2__) || defined(__thumb__)
|
#if defined(__thumb2__) || defined(__thumb__)
|
||||||
#define DEFINE_CODE_STATE .thumb SEPARATOR
|
#define DEFINE_CODE_STATE .thumb SEPARATOR
|
||||||
#define DECLARE_FUNC_ENCODING .thumb_func SEPARATOR
|
#define DECLARE_FUNC_ENCODING .thumb_func SEPARATOR
|
||||||
#if defined(__thumb2__)
|
#if defined(__thumb2__)
|
||||||
#define USE_THUMB_2
|
#define USE_THUMB_2
|
||||||
#define IT(cond) it cond
|
#define IT(cond) it cond
|
||||||
#define ITT(cond) itt cond
|
#define ITT(cond) itt cond
|
||||||
#define ITE(cond) ite cond
|
#define ITE(cond) ite cond
|
||||||
#else
|
#else
|
||||||
@@ -158,10 +158,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ARM_HAS_BX
|
#ifdef ARM_HAS_BX
|
||||||
#define JMP(r) bx r
|
#define JMP(r) bx r
|
||||||
#define JMPc(r, c) bx##c r
|
#define JMPc(r, c) bx##c r
|
||||||
#else
|
#else
|
||||||
#define JMP(r) mov pc, r
|
#define JMP(r) mov pc, r
|
||||||
#define JMPc(r, c) mov##c pc, r
|
#define JMPc(r, c) mov##c pc, r
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -187,18 +187,18 @@
|
|||||||
#define DEFINE_CODE_STATE
|
#define DEFINE_CODE_STATE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define GLUE2_(a, b) a##b
|
#define GLUE2_(a, b) a##b
|
||||||
#define GLUE(a, b) GLUE2_(a, b)
|
#define GLUE(a, b) GLUE2_(a, b)
|
||||||
#define GLUE2(a, b) GLUE2_(a, b)
|
#define GLUE2(a, b) GLUE2_(a, b)
|
||||||
#define GLUE3_(a, b, c) a##b##c
|
#define GLUE3_(a, b, c) a##b##c
|
||||||
#define GLUE3(a, b, c) GLUE3_(a, b, c)
|
#define GLUE3(a, b, c) GLUE3_(a, b, c)
|
||||||
#define GLUE4_(a, b, c, d) a##b##c##d
|
#define GLUE4_(a, b, c, d) a##b##c##d
|
||||||
#define GLUE4(a, b, c, d) GLUE4_(a, b, c, d)
|
#define GLUE4(a, b, c, d) GLUE4_(a, b, c, d)
|
||||||
|
|
||||||
#define SYMBOL_NAME(name) GLUE(__USER_LABEL_PREFIX__, name)
|
#define SYMBOL_NAME(name) GLUE(__USER_LABEL_PREFIX__, name)
|
||||||
|
|
||||||
#ifdef VISIBILITY_HIDDEN
|
#ifdef VISIBILITY_HIDDEN
|
||||||
#define DECLARE_SYMBOL_VISIBILITY(name) HIDDEN(SYMBOL_NAME(name)) SEPARATOR
|
#define DECLARE_SYMBOL_VISIBILITY(name) HIDDEN(SYMBOL_NAME(name)) SEPARATOR
|
||||||
#define DECLARE_SYMBOL_VISIBILITY_UNMANGLED(name) HIDDEN(name) SEPARATOR
|
#define DECLARE_SYMBOL_VISIBILITY_UNMANGLED(name) HIDDEN(name) SEPARATOR
|
||||||
#else
|
#else
|
||||||
#define DECLARE_SYMBOL_VISIBILITY(name)
|
#define DECLARE_SYMBOL_VISIBILITY(name)
|
||||||
|
|||||||
56
ccid.h
56
ccid.h
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#define SYNC (0x03)
|
#define SYNC (0x03)
|
||||||
#define CTRL (0x06)
|
#define CTRL (0x06)
|
||||||
#define NAK (0x15)
|
#define NAK (0x15)
|
||||||
|
|
||||||
#define BMICCSTATUS_MASK 0x03
|
#define BMICCSTATUS_MASK 0x03
|
||||||
/*
|
/*
|
||||||
@@ -23,48 +23,52 @@
|
|||||||
|
|
||||||
// TODO: rename/renumber
|
// TODO: rename/renumber
|
||||||
#define SLOT_0_MASK 0x03
|
#define SLOT_0_MASK 0x03
|
||||||
#define CARD_OUT_1 0x02
|
#define CARD_OUT_1 0x02
|
||||||
#define CARD_IN_1 0x03
|
#define CARD_IN_1 0x03
|
||||||
#define SLOT_1_MASK 0x0C
|
#define SLOT_1_MASK 0x0C
|
||||||
#define CARD_IN_2 0x04
|
#define CARD_IN_2 0x04
|
||||||
#define CARD_OUT_2 0x0C
|
#define CARD_OUT_2 0x0C
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* * BULK_OUT messages from PC to Reader
|
* * BULK_OUT messages from PC to Reader
|
||||||
* * Defined in CCID Rev 1.1 6.1 (page 26)
|
* * Defined in CCID Rev 1.1 6.1 (page 26)
|
||||||
* */
|
* */
|
||||||
#define CCID_MESSAGE_TYPE_PC_to_RDR_IccPowerOn 0x62
|
#define CCID_MESSAGE_TYPE_PC_to_RDR_IccPowerOn 0x62
|
||||||
#define CCID_MESSAGE_TYPE_PC_to_RDR_IccPowerOff 0x63
|
#define CCID_MESSAGE_TYPE_PC_to_RDR_IccPowerOff 0x63
|
||||||
#define CCID_MESSAGE_TYPE_PC_to_RDR_GetSlotStatus 0x65
|
#define CCID_MESSAGE_TYPE_PC_to_RDR_GetSlotStatus 0x65
|
||||||
#define CCID_MESSAGE_TYPE_PC_to_RDR_XfrBlock 0x6f
|
#define CCID_MESSAGE_TYPE_PC_to_RDR_XfrBlock 0x6f
|
||||||
#define CCID_MESSAGE_TYPE_PC_to_RDR_GetParameters 0x6c
|
#define CCID_MESSAGE_TYPE_PC_to_RDR_GetParameters 0x6c
|
||||||
#define CCID_MESSAGE_TYPE_PC_to_RDR_ResetParameters 0x6d
|
#define CCID_MESSAGE_TYPE_PC_to_RDR_ResetParameters 0x6d
|
||||||
#define CCID_MESSAGE_TYPE_PC_to_RDR_SetParameters 0x61
|
#define CCID_MESSAGE_TYPE_PC_to_RDR_SetParameters 0x61
|
||||||
#define CCID_MESSAGE_TYPE_PC_to_RDR_Escape 0x6b
|
#define CCID_MESSAGE_TYPE_PC_to_RDR_Escape 0x6b
|
||||||
#define CCID_MESSAGE_TYPE_PC_to_RDR_IccClock 0x6e
|
#define CCID_MESSAGE_TYPE_PC_to_RDR_IccClock 0x6e
|
||||||
#define CCID_MESSAGE_TYPE_PC_to_RDR_T0APDU 0x6a
|
#define CCID_MESSAGE_TYPE_PC_to_RDR_T0APDU 0x6a
|
||||||
#define CCID_MESSAGE_TYPE_PC_to_RDR_Secure 0x69
|
#define CCID_MESSAGE_TYPE_PC_to_RDR_Secure 0x69
|
||||||
#define CCID_MESSAGE_TYPE_PC_to_RDR_Mechanical 0x71
|
#define CCID_MESSAGE_TYPE_PC_to_RDR_Mechanical 0x71
|
||||||
#define CCID_MESSAGE_TYPE_PC_to_RDR_Abort 0x72
|
#define CCID_MESSAGE_TYPE_PC_to_RDR_Abort 0x72
|
||||||
#define CCID_MESSAGE_TYPE_PC_to_RDR_SetDataRateAndClockFrequency 0x73
|
#define CCID_MESSAGE_TYPE_PC_to_RDR_SetDataRateAndClockFrequency 0x73
|
||||||
/*
|
/*
|
||||||
* * BULK_IN messages from Reader to PC
|
* * BULK_IN messages from Reader to PC
|
||||||
* * Defined in CCID Rev 1.1 6.2 (page 48)
|
* * Defined in CCID Rev 1.1 6.2 (page 48)
|
||||||
* */
|
* */
|
||||||
#define CCID_MESSAGE_TYPE_RDR_to_PC_DataBlock 0x80
|
#define CCID_MESSAGE_TYPE_RDR_to_PC_DataBlock 0x80
|
||||||
#define CCID_MESSAGE_TYPE_RDR_to_PC_SlotStatus 0x81
|
#define CCID_MESSAGE_TYPE_RDR_to_PC_SlotStatus 0x81
|
||||||
#define CCID_MESSAGE_TYPE_RDR_to_PC_Parameters 0x82
|
#define CCID_MESSAGE_TYPE_RDR_to_PC_Parameters 0x82
|
||||||
#define CCID_MESSAGE_TYPE_RDR_to_PC_Escape 0x83
|
#define CCID_MESSAGE_TYPE_RDR_to_PC_Escape 0x83
|
||||||
#define CCID_MESSAGE_TYPE_RDR_to_PC_DataRateAndClockFrequency 0x84
|
#define CCID_MESSAGE_TYPE_RDR_to_PC_DataRateAndClockFrequency 0x84
|
||||||
/*
|
/*
|
||||||
* * INTERRUPT_IN messages from Reader to PC
|
* * INTERRUPT_IN messages from Reader to PC
|
||||||
* * Defined in CCID Rev 1.1 6.3 (page 56)
|
* * Defined in CCID Rev 1.1 6.3 (page 56)
|
||||||
* */
|
* */
|
||||||
#define CCID_MESSAGE_TYPE_RDR_to_PC_NotifySlotChange 0x50
|
#define CCID_MESSAGE_TYPE_RDR_to_PC_NotifySlotChange 0x50
|
||||||
#define CCID_MESSAGE_TYPE_RDR_to_PC_HardwareError 0x51
|
#define CCID_MESSAGE_TYPE_RDR_to_PC_HardwareError 0x51
|
||||||
|
|
||||||
/* Status codes that go in bStatus (see 6.2.6) */
|
/* Status codes that go in bStatus (see 6.2.6) */
|
||||||
enum { ICC_STATUS_PRESENT_ACTIVE = 0, ICC_STATUS_PRESENT_INACTIVE, ICC_STATUS_NOT_PRESENT };
|
enum {
|
||||||
|
ICC_STATUS_PRESENT_ACTIVE = 0,
|
||||||
|
ICC_STATUS_PRESENT_INACTIVE,
|
||||||
|
ICC_STATUS_NOT_PRESENT
|
||||||
|
};
|
||||||
enum {
|
enum {
|
||||||
COMMAND_STATUS_NO_ERROR = 0,
|
COMMAND_STATUS_NO_ERROR = 0,
|
||||||
COMMAND_STATUS_FAILED,
|
COMMAND_STATUS_FAILED,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include <nfc/helpers/iso13239_crc.h>
|
#include <nfc/helpers/iso13239_crc.h>
|
||||||
|
|
||||||
#define PICOPASS_POLLER_BUFFER_SIZE (255)
|
#define PICOPASS_POLLER_BUFFER_SIZE (255)
|
||||||
#define PICOPASS_CRC_SIZE (2)
|
#define PICOPASS_CRC_SIZE (2)
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
PicopassPollerSessionStateIdle,
|
PicopassPollerSessionStateIdle,
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define PICOPASS_BLOCK_LEN 8
|
#define PICOPASS_BLOCK_LEN 8
|
||||||
#define PICOPASS_MAX_APP_LIMIT 32
|
#define PICOPASS_MAX_APP_LIMIT 32
|
||||||
#define PICOPASS_UID_LEN 8
|
#define PICOPASS_UID_LEN 8
|
||||||
#define PICOPASS_READ_CHECK_RESP_LEN 8
|
#define PICOPASS_READ_CHECK_RESP_LEN 8
|
||||||
#define PICOPASS_CHECK_RESP_LEN 4
|
#define PICOPASS_CHECK_RESP_LEN 4
|
||||||
#define PICOPASS_MAC_LEN 4
|
#define PICOPASS_MAC_LEN 4
|
||||||
#define PICOPASS_KEY_LEN 8
|
#define PICOPASS_KEY_LEN 8
|
||||||
|
|
||||||
#define CSN_INDEX 0
|
#define CSN_INDEX 0
|
||||||
#define CFG_INDEX 1
|
#define CFG_INDEX 1
|
||||||
#define EPURSE_INDEX 2
|
#define EPURSE_INDEX 2
|
||||||
#define KD_INDEX 3
|
#define KD_INDEX 3
|
||||||
#define KC_INDEX 4
|
#define KC_INDEX 4
|
||||||
#define AIA_INDEX 5
|
#define AIA_INDEX 5
|
||||||
#define PACS_CFG_INDEX 6
|
#define PACS_CFG_INDEX 6
|
||||||
#define PACS_INDEX 7
|
#define PACS_INDEX 7
|
||||||
#define SR_SIO_INDEX 10
|
#define SR_SIO_INDEX 10
|
||||||
|
|
||||||
#define PICOPASS_FDT_LISTEN_FC (1000)
|
#define PICOPASS_FDT_LISTEN_FC (1000)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#include <furi_hal_nfc.h>
|
#include <furi_hal_nfc.h>
|
||||||
|
|
||||||
#define RFAL_PICOPASS_UID_LEN 8
|
#define RFAL_PICOPASS_UID_LEN 8
|
||||||
#define PICOPASS_BLOCK_LEN 8
|
#define PICOPASS_BLOCK_LEN 8
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
// PicoPass command bytes:
|
// PicoPass command bytes:
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
|
|
||||||
#define TAG "SAMAPI"
|
#define TAG "SAMAPI"
|
||||||
|
|
||||||
#define APDU_HEADER_LEN 5
|
#define APDU_HEADER_LEN 5
|
||||||
#define ASN1_PREFIX 6
|
#define ASN1_PREFIX 6
|
||||||
#define ASN1_DEBUG true
|
#define ASN1_DEBUG true
|
||||||
#define SEADER_ICLASS_SR_SIO_BASE_BLOCK 10
|
#define SEADER_ICLASS_SR_SIO_BASE_BLOCK 10
|
||||||
#define SEADER_SERIAL_FILE_NAME "sam_serial"
|
#define SEADER_SERIAL_FILE_NAME "sam_serial"
|
||||||
|
|
||||||
const uint8_t picopass_iclass_key[] = {0xaf, 0xa7, 0x85, 0xa7, 0xda, 0xb3, 0x33, 0x78};
|
const uint8_t picopass_iclass_key[] = {0xaf, 0xa7, 0x85, 0xa7, 0xda, 0xb3, 0x33, 0x78};
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
#include "protocol/picopass_protocol.h"
|
#include "protocol/picopass_protocol.h"
|
||||||
|
|
||||||
#define SEADER_CRED_NAME_MAX_LEN 22
|
#define SEADER_CRED_NAME_MAX_LEN 22
|
||||||
#define SEADER_APP_EXTENSION ".credential"
|
#define SEADER_APP_EXTENSION ".credential"
|
||||||
#define SEADER_APP_MFC_EXTENSION ".nfc"
|
#define SEADER_APP_MFC_EXTENSION ".nfc"
|
||||||
#define SEADER_APP_MFC_FOLDER ANY_PATH("nfc")
|
#define SEADER_APP_MFC_FOLDER ANY_PATH("nfc")
|
||||||
|
|
||||||
typedef void (*SeaderLoadingCallback)(void* context, bool state);
|
typedef void (*SeaderLoadingCallback)(void* context, bool state);
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
#define TAG "SeaderWorker"
|
#define TAG "SeaderWorker"
|
||||||
|
|
||||||
#define APDU_HEADER_LEN 5
|
#define APDU_HEADER_LEN 5
|
||||||
#define ASN1_PREFIX 6
|
#define ASN1_PREFIX 6
|
||||||
#define ASN1_DEBUG true
|
#define ASN1_DEBUG true
|
||||||
|
|
||||||
#define RFAL_PICOPASS_TXRX_FLAGS \
|
#define RFAL_PICOPASS_TXRX_FLAGS \
|
||||||
(FURI_HAL_NFC_LL_TXRX_FLAGS_CRC_TX_MANUAL | FURI_HAL_NFC_LL_TXRX_FLAGS_AGC_ON | \
|
(FURI_HAL_NFC_LL_TXRX_FLAGS_CRC_TX_MANUAL | FURI_HAL_NFC_LL_TXRX_FLAGS_AGC_ON | \
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
#include <PAC.h>
|
#include <PAC.h>
|
||||||
#include <SamVersion.h>
|
#include <SamVersion.h>
|
||||||
|
|
||||||
#define SEADER_POLLER_MAX_FWT (200000U)
|
#define SEADER_POLLER_MAX_FWT (200000U)
|
||||||
#define SEADER_POLLER_MAX_BUFFER_SIZE (255U)
|
#define SEADER_POLLER_MAX_BUFFER_SIZE (255U)
|
||||||
|
|
||||||
struct SeaderWorker {
|
struct SeaderWorker {
|
||||||
|
|||||||
Reference in New Issue
Block a user